• Post Reply Bookmark Topic Watch Topic
  • New Topic

Query in the topic static  RSS feed

 
shalini saranya
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all





what is the output of above code?
Is it a a a or a d a?
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best thing to do is actually try it yourself - compile the code and run it. Then try and work out why that's the output, and if you don't understand come back to us, and we can try and explain it.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And also always tell us where you found such examples.
 
shalini saranya
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the question from the book SCJP 6 by kathy sierra
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Anshul K Jain
Greenhorn
Posts: 20
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question for getting the idea of the static method.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!