Re: Brand new to Java student
- From: "HightowerC" <chris.hightower@xxxxxxxxx>
- Date: 30 Jan 2007 11:56:01 -0800
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
.
- References:
- Brand new to Java student
- From: Sandy
- Re: Brand new to Java student
- From: Andrew Thompson
- Re: Brand new to Java student
- From: Knute Johnson
- Brand new to Java student
- Prev by Date: JSP won't compile... error contains no info......
- Next by Date: Re: New line in a JTextArea (student learning here)
- Previous by thread: Re: Brand new to Java student
- Next by thread: Re: Brand new to Java student
- Index(es):
Relevant Pages
|