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...

why the primitive data type have classes?

Answer Posted / manikandan [ gtec,vellore ]

there are different type of data types such as int,char
etc.for example suppose if we using arrays it can store a
similar data types but we need to store a char and int in a
same array what can we do for this situation. the wrapper
class helps in this situation by storing a objects in to a
arrays.

example

ArrayList v=new ArrayList();
v.add(new Integer(1));
v.add(new Character('a'));//

the int and char are different type but we stores it by an
object.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the three parts of a lambda expression? What is the type of lambda expression?

1083


What is the difference between private & public & friendly classes?

1110


What is java and its types?

1165


What technique is carried out to find out if a particular string is empty?

1057


What is the independent variable in an experiment?

999


What is the difference between a method and a function in alice?

1277


what do you mean by classloader in java?

1068


Can an unreferenced object be referenced again?

1246


Is arraylist an object in java?

1228


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

1135


What is a numeric literal?

1142


Can a constructor call the constructor of parent class?

1081


Write a program to find maximum and minimum number in array?

1045


Can we override the static methods?

1084


java program with complete 4 oops concepts implemented example

3211