Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrapper class " Watch "Wrapper class " New topic

Wrapper class

Sun Craven

Joined: Mar 13, 2008
Posts: 27
why the following statement is incorrect?
Every wrapper has a public void toString(); method
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 ]

Sun Craven

Joined: Mar 13, 2008
Posts: 27

Yeah .I C.Thank you Jart.
I am careless..
I agree. Here's the link:
subject: Wrapper class