This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Wrapper classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrapper classes" Watch "Wrapper classes" New topic
Author

Wrapper classes

Sudipta Das
Greenhorn

Joined: Apr 05, 2001
Posts: 18
All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character)

1.are public
2.are serializable
3.are immutatable
4.extend java.lang.Number
5.are final
Art Metzer
Ranch Hand

Joined: Oct 31, 2000
Posts: 241
Sudipta Das
Greenhorn

Joined: Apr 05, 2001
Posts: 18
Originally posted by Sudipta Das:
All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character)

1.are public
2.are serializable
3.are immutatable
4.extend java.lang.Number
5.are final


I suppose my question was misinterpreted. I meant to ask which is the correct answer of the fol. question :
All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character)

1.are public
2.are serializable
3.are immutatable
4.extend java.lang.Number
5.are final
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
public final class Character extends Object implements java.io.Serializable
public final class Boolean implements java.io.Serializable
public final class Double extends Number
public final class Float extends Number
public final class Integer extends Number
public final class Long extends Number
public final class Short extends Number
public abstract class Number implements java.io.Serializable
So the answer is:
1, 2, 3, 5

------------------
Moderator of the Programmer Certification Forums


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I never noticed but the Character class specifically extends Object. That's a little odd, isn't it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrapper classes
 
Similar Threads
== Vs .equals()
String immutability
Wrapper Classes
toString()........
primary key type can't be primitive type. True?