MCQs
ASCII code for ‘A’ is 65 and for ‘a’ is 97.
output:
$ javac asciicodes.java
$ java asciicodes
65 97
None.
output:
$ javac average.java
$ java average
16.46666666666667
boolean '&' operator always returns true or false. var1 is defined true and var2 is defined false hence their '&' operator result is false.
output:
$ javac booloperators.java
$ java booloperators
false
None.
output:
$ javac mainclass.java
$ java mainclass
true
Range of data type float is 3.4e-038 to 3.4e+308.
ASCII value of 'A' is 65, on using ++ operator character value increments by one.
output:
$ javac mainclass.java
$ java mainclass
66
None.
An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted
to int before any calculation is done.
Byte occupies 8 bits in memory. Its range is from -128 to 127.
First 0 to 127 character set in Unicode are same as those of ISO-LAIN-1 and ASCII.