Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

toString() in java

View previous topic View next topic Go down

GMT + 3 Hours toString() in java

Post by Diya Sun May 29, 2011 4:05 pm

plz give brief knowledge about toString() method, and also told that if we have two objects .i.e. s1 and s2, then you call the toString() method explicitly for s1, and why you not call the toString() method for s2 explicitly, but implicity.
Diya
Diya
Monstars
Monstars

Taurus Goat
Posts : 364
Join date : 2011-02-08
Age : 32
Notworthy

Character sheet
Experience:
toString() in java Left_bar_bleue10/500toString() in java Empty_bar_bleue  (10/500)

Back to top Go down

GMT + 3 Hours Re: toString() in java

Post by Vuhelper Sun May 29, 2011 4:07 pm

toString() can be called both implicitly and explicitly. The example is just to show that it can be called both implicitly and explicitly.


For s1 we have called ourself. And s2 toString() has been called automatically.
avatar
Vuhelper
Deep Bench
Deep Bench

Posts : 97
Join date : 2011-05-29

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum