Alien head

Core Java Quiz

Description: Core Java Quiz
Number of Questions: 10
Created by:
Tags: java

Which of them is a not command line Tool?

  1. 1.java

  2. 2.javaw

  3. 3.javapath

  4. 4.javadoc

Answer: 3

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

Answer: 1

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)

Answer: 4

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

Answer: 2

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

Answer: 3

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

Answer: 3

What is the default layout manager for a panel?

  1. 1.BorderLayout

  2. 2.Ther is no layout

  3. 3.FlowLayout

  4. 4.GridLayout

Answer: 1

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

Answer: 2

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

Answer: 4

Which is not a characteristics of Java programming language?

  1. 1.Robust

  2. 2.Procedural

  3. 3.Distributed

  4. 4.Multithreaded

Answer: 2
+ View questions