Core Java Quiz
Tests fundamental Core Java concepts including command line tools, variables, collections, OOP principles, exception handling, arrays, and language characteristics.
Questions
Which of them is a not command line Tool?
- 1.java
- 2.javaw
- 3.javapath
- 4.javadoc
A/An___instance variable is shared by all instances of the class.It exist even before the object is created
- 1.instance
- 2.abstract
- 3.interface
- 4.static
Which of the following is not a method of java.util.ArrayList?
- 1.add(Object x)
- 2.remove(Object x)
- 3.contains(Object x)
- 4.insert(int i,Object x)
- 5.set(int I,Object x)
Providing access to the object only through its member functions,while keeping the details private is called_____
- 1.information hiding
- 2.encapsulation
- 3.Inheritance
- 4.modularity
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.Empty set
- 2.one pair a==true,b==false
- 3.two pairs in which a==true
- 4.two paires in which a!=b
- 5.All 4possible combination
A "has a" relationship between classes represents ___ and "is a" represents__
- 1.static,nonstatic class
- 2.Inheritance,Composition
- 3.Composition,Inheritance
- 4.Overriding,Overloading
What is the default layout manager for a panel?
- 1.BorderLayout
- 2.Ther is no layout
- 3.FlowLayout
- 4.GridLayout
What happens in a method if an unchecked exception is thrown in a try block and there is no matching catch block?
- 1.program ignores exceptn
- 2.program halts immediately
- 3.Program will not compile
- 4.None of the above
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.11011
- 2.1121
- 3.11222
- 4.11235
- 5.11248
Which is not a characteristics of Java programming language?
- 1.Robust
- 2.Procedural
- 3.Distributed
- 4.Multithreaded