Thread: wrapper classes
View Single Post
  #1 (permalink)  
Old 12-10-2007, 11:19 PM
sireesha sireesha is offline
Member
 
Join Date: Nov 2007
Posts: 50
sireesha is on a distinguished road
wrapper classes
which is usefull(commonly used) way to represent numbers like
int x,y;
or
Integer x,y;
what is the difference between them ?
i wrote code like
Code:
class test4 { public static void main(String args[]) { Integer x,y; x=23; y=30; System.out.println(x+ys); } }
i got following errors
1.incompatible types
2. operator + cannot be applied to java.lang.Integer,java.lang.Integer.

what is wrong with my code ?
please tell me..
Reply With Quote
Sponsored Links