Re: Brand new to Java student



On Jan 28, 1:53 pm, Knute Johnson <nos...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Andrew Thompson wrote:
On Jan 29, 6:24 am, "Sandy" <s...@xxxxxxxxxxxxxx> wrote:
I am taking a course and we are using Java as our language. I haven't
used Java before so I am VERY new.

In that case, it is best to be coding command line
applications, until you become used to the control
and looping structures, methods, attributes and
classes, variable scope and other things.

People approaching GUI devlopment should *not*
be describing themselves as 'VERY new'.

For some reason I cannot figure out how to tell what the 'value' of
the string is, although I can use the string. Here is my code:

<code>
public void actionPerformed(ActionEvent e)
....
// compare the object references
if(type == "C" || type == "c")

// compare the string contents
if ( type.equals("C") || type.equals("c") )
....

Andrew T.

or type.equalsIgnoreCase("c")

--


Shouldn't need equalsIgnoreCase() because of the use of
String.toUpperCase()
......just a thought

ChrisH

.



Relevant Pages

  • Re: Brand new to Java student
    ... Andrew Thompson wrote: ... variable scope and other things. ... the string is, although I can use the string. ...
    (comp.lang.java.help)
  • Re: CreateEventProc error
    ... Private Sub BuildDisplayForm(strPath As String, ... Dim qdf As QueryDef, qdfControls As QueryDef ... Dim ctl As Control, ctlLabel As Control, ctlParent As Control ... Dim strFilter As String, strSuffix As String, strParentName As String, ...
    (microsoft.public.access.forms)
  • Having trouble with multi-select list box in Access
    ... Const mstrcRange_Begin As String ... name of a control that represents the End part of a range ... On Error GoTo ErrHandler ...
    (microsoft.public.access.gettingstarted)
  • Re: All Menu Navigation
    ... i based the implementation on sample code from http://www.asp.net/CSSAdapters/Menu.aspx, which shows how to create decent HTML for a Menu control bound to a SiteMapDataSource. ... public void RenderBeginTag(HtmlTextWriter writer, string cssClass) ... static public void RemoveProblemTypes ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DataGrid not showing programmatic changes
    ... There's another data grid control that will connect, ... DAO then select the DBGrid32.ocx. ... > Public Property Let Connection(ByVal sConn As String) ...
    (microsoft.public.vb.general.discussion)