• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what should i need to do..

 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic