| Author |
what should i need to do..
|
saikrishna cinux
Ranch Hand
Joined: Apr 16, 2005
Posts: 689
|
|
why s displays JAVA is displyed ? but here x is not displaying JAVA what to do for displaying JAVA here should i need to change the state of this object?
|
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
Are you really surprised that this prints "JAVA"? What's XYZ? Is it your own class? If you want this to print "JAVA", then you should implement your own toString() method in class XYZ.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: what should i need to do..
|
|
|