• Post Reply Bookmark Topic Watch Topic
  • New Topic

Wrapper classes

 
Sudipta Das
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Sudipta Das
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never noticed but the Character class specifically extends Object. That's a little odd, isn't it?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!