Monday, April 2, 2012

Must known basics in Java

How to print integer value of a char in java?.......................by typecasting data type (int)'a'
what will be output of char ch=296; sysout(ch).......................?
is it valid declaration ? float a=0.7; .........................................No
what will it print ? int i=+-30; or int i=-+30 ............................-30
what will it print int i=10/0; sysout (i); ...................................Airthmatic Exception
what will it print double d=10/0.0; sysout (d); .......................-Infintiy (Double.NEGATIVE_INFINITY)

No comments: