aspose file tools*
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 Java 8 in Action this week in the Java 8 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: 13884
    
  10


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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: what should i need to do..
 
Similar Threads
why String vlass reference variable holds content ?
String Objects Confusion
Qa dd'rouy Again
user input
user defined data type