Re: Brand new to Java student



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")

--

Knute Johnson
email s/nospam/knute/
.



Relevant Pages

  • Re: NEWBIE HELP: Missing identifier?
    ... On Wed, 24 Nov 2004 17:11:15 GMT, The Trilateral Commission's orbital mind control lasers transmitted a message from Andrew Thompson: ... :> strArray = new String[] ... They merely report what the Java compiler ...
    (comp.lang.java.help)
  • Re: Obtain file path and file name using file chooser
    ... Andrew Thompson wrote: ... I cannot see why the code needs to be manipulating the ... If the String name of the File *is* actually of interest, ... I have revised a earlier program which is a JTextField input now to be ...
    (comp.lang.java.help)
  • Re: Tab character in JOptionPane?
    ... Andrew Thompson wrote: ... JComponent used to render the String. ... public class TabsInMessage { ...
    (comp.lang.java.help)
  • Re: out of memory, help!
    ... > Andrew Thompson wrote in message ... ... > to concatenate a big string. ... quite easily without a memory exception. ...
    (comp.lang.java.programmer)
  • Re: RandomAccessFile.readLine() returns an empty string
    ... On Thu, 29 Apr 2004 09:19:51 GMT, Andrew Thompson ... Line to readLine means a variable length string of ... linelength. ... then do a writeUTF to write a variable length string ...
    (comp.lang.java.help)