This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Wrapper class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrapper class " Watch "Wrapper class " New topic
Author

Wrapper class

Sun Craven
Greenhorn

Joined: Mar 13, 2008
Posts: 27
why the following statement is incorrect?
Every wrapper has a public void toString(); method
Thanks
Sun Craven
Jart Bo
Ranch Hand

Joined: Oct 22, 2007
Posts: 144
Hi Sun,

Actually there is a method

public String toString()

for the wrapper classes. The return type void is wrong.
[ April 15, 2008: Message edited by: Jart Bo ]

SCJP, SCWCD
Sun Craven
Greenhorn

Joined: Mar 13, 2008
Posts: 27

Yeah .I C.Thank you Jart.
I am careless..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrapper class
 
Similar Threads
Autoboxing Issue: Integer Wrapper==double primitive
Wrapper Classes
Accessing array using EL
Design Pattern
primary key type can't be primitive type. True?