Alien head

Core Java Quiz

Description: Core Java Quiz
Number of Questions: 10
Created by:
Tags: java
Attempted 0/10 Correct 0 Score 0

Which of them is a not command line Tool?

  1. 1.java

  2. 2.javaw

  3. 3.javapath

  4. 4.javadoc

Correct Option: C

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

Correct Option: A

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)

Correct Option: D

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

Correct Option: B

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

Correct Option: C

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

Correct Option: C

What is the default layout manager for a panel?

  1. 1.BorderLayout

  2. 2.Ther is no layout

  3. 3.FlowLayout

  4. 4.GridLayout

Correct Option: A

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

Correct Option: B

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

Correct Option: D

Which is not a characteristics of Java programming language?

  1. 1.Robust

  2. 2.Procedural

  3. 3.Distributed

  4. 4.Multithreaded

Correct Option: B
+ View questions