class test { public static void main(String args[]) { int i,j,k,l=0; k = l++; j = ++k; i = j++; System.out.println(i);//prints 1 S.o.p(j);//prints 1 S.o.p(k);//prints 1(i have doubt on this ans) Please could anyone tell me whether my ans are right Regards Neha } }
nss
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
posted
0
it should print 1,2,1 and that result is correct HIH
------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform