Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners can we add primitive data to wrapper class object
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Muneeb
can we add primitive data to wrapper class object
1 Answer(s)      4 years ago
Posted in : Java Beginners


Hi, Here is my code: class Myclass{ public static void main(String args[]){ int i=2; Integer a= new Integer(3); a=a+i; System.out.println("a"+a); } }

Thanks


Advertisement
View Answers

November 10, 2010 at 3:10 PM


Hello Friend,

Yes, you can.

Thanks



Related Tutorials/Questions & Answers:
can we add primitive data to wrapper class object
can we add primitive data to wrapper class object  Hi, Here is my code: class Myclass{ public static void main(String args[]){ int i=2; Integer... Friend, Yes, you can. Thanks
Wrapper Class in Java
Wrapper Classes provide object methods for the eight primitive data types... package that defines the eight primitive data types in Java. We need Wrapper... that holds the value 10. Whereas, object of a Wrapper Integer class can be created
Advertisements
Wrapper Class
Wrapper Class  what is wrapper class in java and why we use it   Hi Friend, Wrapper class is a wrapper around a primitive data type. It represents primitive data types in their corresponding class instances e.g.
Wrapper
provides wrapper classes corresponding to each primitive data types in its "... and corresponding wrapper class: Primitive type Wrapper class byte... utility methods to manipulate the values. All of the primitive wrapper classes
wrapper class.
wrapper class.  Write short note on character wrapper class.   Java Character Wrapper class The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field
Wrapper Classes
. Wrapper class is a wrapper around a primitive data type. It represents... can be represented as a Boolean class instance. All of the primitive wrapper...Primitive Wrapper Class In this section you will learn about Wrapper classes
wrapper class
wrapper class  list wrapper class methods
wrapper class
wrapper class  wrapper class methods
Java Wrapper Class Example
respective wrapper class : Primitive Data Type Wrapper Class boolean...Java Wrapper Class Example In this section we will read about how to use the wrapper classes in Java. Wrapper classes wrap the primitive data types
wrapper class
wrapper class  why wrapper class does not have a default constructor
java-wrapper class
java-wrapper class  dear people, may i know how to convert primitive data type into corresponding object using wrapper class with example please!!!   public class IntToIntegerExample { public static void
can we use scanner class,class , object and methods to get output without using constructor ????
can we use scanner class,class , object and methods to get output without using constructor ????  im getting error here..i hav used scanner class... am i getting error here... can we get output using scanner class , object
Examples of Wrapper Class
Examples of Wrapper Class In this page we are giving you the links...;  1.  Adding value through add(int, Object) method. 2.  Adding value through add(Object) method. 3.  Append all elements through
Primitive Data Types
In this section we will discuss about Primitive Data Types in Java 7
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)  Hi I had created an class of subscription,and iam trying to add an radio... class: import java.util.*; /** * State generated by hbm2java */ public
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)  Hi I had created an class of subscription,and iam trying to add an radio... class: import java.util.*; /** * State generated by hbm2java */ public
size of all primitive data
size of all primitive data   java program for to find the size of all primitive data types in java
Wrapper Class - Java Beginners
Wrapper Class  What is Wrapper class? Why are they use
Wrapper Classes
that manipulate data and allows to operate a certain work. Wrapper class is a wrapper around a primitive data type. It represents primitive data types in their corresponding class instances e.g. a boolean data type can be represented
wrapper classes
;Java Wrapper Class Wrapper class is a wrapper around a primitive data type. It represents primitive data types in their corresponding class instances e.g. a boolean data type can be represented as a Boolean class instance. All
Are arrays primitive data types?
Are arrays primitive data types?   Hi, Are arrays primitive data types? thanks   Hi, In Java, Arrays are objects. Identifier are some... as primitive data type
Java Integer class
; Java provides wrapper classes corresponding to each primitive data types... wrapper object can be helpful in situations where only objects can be utilized... wraps a value of type int in an object. It's constructor can take int value
Wrapper Class - Java Beginners
Wrapper Class  Please explain the above question on Wrapper class with some examples
Autoboxing in Java
types into Wrapper class by Java compiler takes place when: a primitive data... of corresponding wrapper class a primitive data type is assigned to a variable of the corresponding wrapper class. Primitive data type Wrapper class
wrapper class concept
wrapper class concept  Write a Java class that stores an integer item id, a string item name and a float price. Store all these in a String member Variable, separated by a space delimiter. Use an overloaded method to add
Can you create an object of an abstract class?
Can you create an object of an abstract class?   Hi, Can you create an object of an abstract class? Thanks
Wrapper Character class.
Wrapper Character class.  How do the methods 'isIndentifierIgnorable(ch)' and 'isISOControl(ch)' work?? while workin with 'Character' wrapper class... otherwise or you can say it determines if the specified character should
Character Wrapper Class.
Character Wrapper Class.  what are Mirrored Unicode Characters?? and whats the use of "isMirrored(ch);method ??.where ch is any character argument..!!   Unicode is capable of representing many languages, including those
Can we instantiate abstract class in Java?
Can we instantiate abstract class in Java?  HI, Can we instantiate abstract class in Java? Thanks   Hi, No, you can't instantiate an abstract class. Thanks
Wrapper Class Tutorial and Examples
Wrapper Class Tutorial and Examples   ... an element with the add(int, Object) method In this section you will learn to insert an element at the specified position using the add(int, Object) method
How can we save a data list in jsf?
How can we save a data list in jsf?  I have a code in jsf that fires a query in Data Base each time it is called, i have added a validation check to fire query only if list is not-empty but the list gets empty each time
Advertisements
 

 

 

DMCA.com