Posts

Showing posts with the label JAva

Bscit-5 JAVA

JAVA 1.which of the following is a valid main() method? a) Public static void main() b) Public static void main(String []s) c) Void main(String args[]) d) None of the above 2.which element of the array arr is represented in arr[7]? a) The sixth b) The seventh c) The eight d) None of the above 3.which of the following is a reserved word in java? a) Template b) Throwing c) This d) Both (b) and (c) 4.which of the following is a primitive data type? a) Byte b) String c) Integer d) Float 5.the && and || operators a) compare two numeic values b) combine two numeric values c) compare two bookean values d) combine two Boolean values 6.the break statement causes an exit a) only from the innermost loop b) only from the innermost switch c) from all loops and switches d) from the innermost loops or switch 7.what is the output of the following program segment? For(I=1;j=0;I System.out.println(i); a) 10 b) 11 c) 55 d) 45 8.classes are useful because they a) permit data to be hidden from othe...