This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes what should i need to do.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "what should i need to do.." Watch "what should i need to do.." New topic
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16


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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what should i need to do..
 
Similar Threads
user defined data type
user input
why String vlass reference variable holds content ?
String Objects Confusion
Qa dd'rouy Again