Core Java Quiz

Tests fundamental Core Java concepts including command line tools, variables, collections, OOP principles, exception handling, arrays, and language characteristics.

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of them is a not command line Tool?

  1. 1.java
  2. 2.javaw
  3. 3.javapath
  4. 4.javadoc
Question 2 Multiple Choice (Single Answer)

A/An___instance variable is shared by all instances of the class.It exist even before the object is created

  1. 1.instance
  2. 2.abstract
  3. 3.interface
  4. 4.static
Question 3 Multiple Choice (Single Answer)

Which of the following is not a method of java.util.ArrayList?

  1. 1.add(Object x)
  2. 2.remove(Object x)
  3. 3.contains(Object x)
  4. 4.insert(int i,Object x)
  5. 5.set(int I,Object x)
Question 4 Multiple Choice (Single Answer)

Providing access to the object only through its member functions,while keeping the details private is called_____

  1. 1.information hiding
  2. 2.encapsulation
  3. 3.Inheritance
  4. 4.modularity
Question 5 Multiple Choice (Single Answer)

Which of the following best descibes the set of all paires of values for boolean variables a and b such that, (!a && b)==!(a||b) evaluates to true?

  1. 1.Empty set
  2. 2.one pair a==true,b==false
  3. 3.two pairs in which a==true
  4. 4.two paires in which a!=b
  5. 5.All 4possible combination
Question 6 Multiple Choice (Single Answer)

A "has a" relationship between classes represents ___ and "is a" represents__

  1. 1.static,nonstatic class
  2. 2.Inheritance,Composition
  3. 3.Composition,Inheritance
  4. 4.Overriding,Overloading
Question 7 Multiple Choice (Single Answer)

What is the default layout manager for a panel?

  1. 1.BorderLayout
  2. 2.Ther is no layout
  3. 3.FlowLayout
  4. 4.GridLayout
Question 8 Multiple Choice (Single Answer)

What happens in a method if an unchecked exception is thrown in a try block and there is no matching catch block?

  1. 1.program ignores exceptn
  2. 2.program halts immediately
  3. 3.Program will not compile
  4. 4.None of the above
Question 9 Multiple Choice (Single Answer)

Which are the values in arr after execution of following.. Int[]arr={1,1,0,0,0}; for(int i=2;i < arr.length;i++) arr[i]=arr[i-1]+arr[i-2];

  1. 1.11011
  2. 2.1121
  3. 3.11222
  4. 4.11235
  5. 5.11248
Question 10 Multiple Choice (Single Answer)

Which is not a characteristics of Java programming language?

  1. 1.Robust
  2. 2.Procedural
  3. 3.Distributed
  4. 4.Multithreaded