Re: Brand new to Java student





On Jan 28, 2:47 pm, "Andrew Thompson" <andrewtho...@xxxxxxxxx> 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.

Well... I am very new to Java (I am quite used to vb.net which is VERY
different) I have now got a few hours with Java, a few years with
vb.net. My course is using Java to teach good class design so I must
learn the language.

Thanks for your help. I am sure I will be looking for more in the
future! ;)

.



Relevant Pages

  • Re: Help me!! Why java is so popular
    ... String or StringBuffer? ... keep in mind I knew NOTHING about Java. ... The language accepted it, no warnings, and thus I ... in some native assemblers you can peruse the instruction ...
    (comp.lang.java.programmer)
  • Re: question about assigning null to a reference object
    ... String getAuthor() ... void setAuthor ... b.setTitle("Thinking in Java 4th Edition"); ...
    (comp.lang.java.help)
  • Re: Java questions: Urgent
    ... why I would expect almost any Java programmer to be able to answer ... Which is the main reason I "butted" in a bit.. ... on the characters in the String. ... > therefore naturally cover all the basics, or they have missed out badly ...
    (comp.lang.java.programmer)
  • Re: A C++ Whishlist
    ... with the C++ string classes as compared with the Java ones. ... You can keep you structs entirely ... The simple separation of interface and implementation that header files ...
    (comp.lang.cpp)
  • Re: Using Cobol when writing CGIs for the OSU web server.
    ... string safe as well as make slow conversion (as bugs are found and ... The string type approach. ... Because no one has bothered to add it to the "offending" language. ... Java is certainly no replacement for C. ...
    (comp.os.vms)