Object Oriented Programming in Java 2019-Objective
Group A
Attempt all the questions. [10x1 = 10]
1.
i) Which one of the following is not a valid java bitwise operator?
a) >> b) << c) >>> d) <<<
1.
ii) Which one of the following keyword is used to declare an exception?
a) throws b) throw c) try d) catch
1.
iii) Which of these is an incorrect array declaration?
a) int ary[] = new int[5]; b) int[] ary = new int[5]; c) int ary = int[5] new; d) int ary[]; ary = new int[5];
1.
iv) Which one of the following access specifier is appropriate for members of superclass to
access only from subclass?
a) private b) protected c) public d) default
1.
v) Which one of the following is not a collection class defined in java?
a) Linked List b) Hash Set c) Tree Set d) Graph Set
1.
vi) Which one of the following inheritance is best implanted using interface in java?
a) single inheritance b) multi-level inheritance c) multiple inheritance d) hierarchical inheritance
1.
vii) Which one of the following method is called only once during the run time of your applet?
a) stop() b) paint() c) init() d) start()
1.
viii) Which of these method of class String is used to compare two String objects for their equality?
a) equals() b) Equals() c) is Equal() d) Is Equal()
1.
ix) What is the default value of priority variable MIN_PRIORITY and MAX_PRIORITY?
a) 0 & 63 b) 1 & 10 c) 0 & 1 d) 1 & 32
1.
x) Which one of the following is not java swing container?
a) Panel b) Tabbed Pane c) Scroll Pane d) Scroll bar