Test Status
      COREJAVARANDOMTEST
      (A) If a Java class contains assert statements, then it must be compiled with -1.4 option.
      (B) When a program having assertions is run, -assertion option must be specified, otherwise the assertions get ignored.
      (C) A possible syntax of assert statement is assert logical_expression If logical_expression evaluates to true, the program generates an AssertionError.
      (D) The program terminates on its first AssertionError.
      (A) ArrayList is a sub class of Vector
      (B) HashTable is a sub class of Dictionary
      (C) LinkedList is a subclass of ArrayList
      (D) Vector is a subclass of Stack
      (A) methods must not have any throws clauses
      (B) methods must not have any parameters
      (C) method should return any one of primitive data types
      (D) All the above
      (A) The width of double is platform dependent
      (B) 64
      (C) 128
      (D) 8
      (A) int[] []x[];
      (B) int x[5];
      (C) int *x;
      (D) None of above
      (A) The range of values is compiler dependent.
      (B) -231 to 231 - 1
      (C) 231-1 to 231
      (D) -215 to 215 - 1
      (A) The default constructor initializes local variables.
      (B) The default constructor invokes the constructor of the superclass.
      (C) The default constructor initializes the instance variables declared in the class.
      (D) When class has only constructor with parameter, the compiler creates a Default constructor
      (A) The class compiles and runs, but does not print anything.
      (B) The number 1 gets printed with AssertionError
      (C) The number 2 gets printed with AssertionError
      (D) The number 3 gets printed with AssertionError
      (A) String str = â??Welcome to Java Programmingâ??
      (B) String str = new String( â??Welcome to Java Programmingâ?? )
      (C) String str; str = â??Welcome to Java Programmingâ??
      (D) String str; str = new String (â??Welcome to Java Programmingâ?? )
      (A) "odd" will always be output.
      (B) "even" will always be output.
      (C) Compilation fails.
      (D) "odd" will be output for odd values of x, and "even" for even values.
      (A) 1alpha
      (B) xy+abc
      (C) both A and B
      (D) None of the above
      (A) The default char data type is a space( â?? â?? ) character.
      (B) The default integer data type is â??longâ?? and real data type is â??floatâ??
      (C) The default integer data type is â??intâ?? and real data type is â??doubleâ??
      (D) The default integer data type is â??intâ?? and real data type is â??floatâ??