Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are wrapper classes?

Answer Posted / guest

The wrapper classes can take constructors of either the
type they are designed to wrap or of a String that can be
converted to that type. Thus the Integer class can take a
number that could be contained by an int, but an error will
occur if you try to pass a number with a floating point
component. Remember that the wrapper classes are just that
classes, they are not primitives and instances of the
wrappers can only be manipulated in the same way as any
class. You may get questions on the exam with code that
uses standard math operations to manipulate instances of
wrappers. You can of course use the + operator where it
would implicitly call the toString method, but as soon as
you see the - * or % operator, beware.

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why generics are used in java?

1053


Write a program to find the whether a number is an Armstrong number or not?

1034


Why java strings are immutable in nature?

1072


How does hashset works in java?

1093


Is java a prime method?

986


What are the differences between include directive and include action?

1192


How to check if linked list contains loop in java?

903


Define jit compiler?

1139


How do you convert boolean to boolean?

1159


What is a native method in java programming?

1068


Is heap stored in ram?

964


Explain the different forms of polymorphism?

1007


Which containers use a flowlayout as their default layout in java programming?

1014


What is a dynamic array java?

949


Mention the default values of all the elements of an array defined as an instance variable.

985