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



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

Have Programming Question? Ask it here!
 
 
 


Muneeb
can we add primitive data to wrapper class object
1 Answer(s)      3 years and 10 months 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
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
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
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
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
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
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
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 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
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
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
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
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
How many cookie object we can store in a session? is there any limit?
How many cookie object we can store in a session? is there any limit?  How many cookie object we can store in a session? is there any limit
Primitive Data Types
Primitive Data Types In java, all the variables needs to be declared first.... The value assigned to a variable determines its data type, on which the legal... Data Types
write a program to demonstrate wrapper class and its methods......
write a program to demonstrate wrapper class and its methods......  write a program to demonstrate wrapper class and its methods
PHP Class Object
PHP Class Object: In object oriented programming a class can be an abstract data type, blue print or template. You could consider the name of a class as noun... the object $a, we  call the function disp with -> operator. Any class can
How can I initialize the JSONArray and JSON object with data?
How can I initialize the JSONArray and JSON object with data?  How can I initialize the JSONArray and JSONObject with data
can we use class in jsp which implements interface
can we use class in jsp which implements interface   can we use class in jsp which implements interface
Wrapper
. This is used by many JDBC driver implementations. Earlier the wrapper used to be data... that are wrapped as proxy class instances. The interface which the developers can use... a wrapper for an object that does. Returns false otherwise. If this implements
Class, Object and Methods
Class, Object and Methods       Class : Whatever we can see in this world all the things are a object... properties of the class or its group. We can understand about the class and object
object of object class
object of object class  what do u mean by "object of object class
Convert Object to Int
Object into a primitive type int and Integer Object to primitive type int. . ... into primitive type int and Integer type object to primitive type int. The parseInt() method of an Integer class takes a numeric string object and returns
please tell me what is ment by wrapper class in java........
please tell me what is ment by wrapper class in java........  what is ment by wrapper class in java
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
class and Object
class and Object  how many classes,References and objects in this following statement.... A a=new B();   Hi, In the statement: A a=new B(); There are 2 classes, Class A and Class B. References : 1 (Object of B
Class and object
Class and object  what is exact meaning for the statement, A a1=new B();   Hi, Here is two classes A and B. A is super class and B is sub class. Here is the code example: public class A { public int i=40
Insert an object with the add(Object) method
at the end of a list using the add(Object) method. Here is an example that provides the usage of the add(Object) method in more detail. Create a class "... Insert an object with the add(Object) method   
Reference Data Types
categories :  Primitive Data Types   ... Data Types in brief In Java a reference data type is a variable that can... of data type are not predefined like primitive data type. The reference data
can we mark the class with abstract..with out having any mothed in tit as abstract!!! - Java Beginners
can we mark the class with abstract..with out having any mothed in tit as abstract!!!  hi, can we wite an calls without any abstract methods in it  Hi Friend, No, you can't create abstract class without abstract
Advertisements
 

 

 

DMCA.com