Object Oriented Programming in Java - Unit Wise Questions
2. Define OOP. Explain features of Object Oriented Programming Language. [1 + 4]
AI is thinking...
1.
i) Which one of the following is not a valid java bitwise operator?
a) >> b) << c) >>> d) <<<
AI is thinking...
3. Explain different types of control statements used in java. [5]
AI is thinking...
1.
ii) Which one of the following keyword is used to declare an exception?
a) throws b) throw c) try d) catch
AI is thinking...
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];
AI is thinking...
4. Define Abstract Class. Explain different types of Access controls available in java.[1 + 4]
AI is thinking...
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
AI is thinking...
5. Define method overriding? Write any program to implement concept of multiple inheritance in Java. [1 + 4]
AI is thinking...
6. Why it is important to handle exception in java? Write a program to illustrate the use of exception handling. [1 + 4]
AI is thinking...
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
AI is thinking...
7. Define the use of static keyword. Write any four String methods used in java with example. [1 + 4]
AI is thinking...
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
AI is thinking...
8. Define super, final and this keyword in java. Explain the concept of MVC in brief. [1 + 1 + 1 + 2]
AI is thinking...
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()
AI is thinking...
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()
AI is thinking...
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
AI is thinking...
9. a) Define multithreading. Write a java program to show the inter-thread communication. [1 + 4]
b) Define Stream. Write a program in java to copy the content from one file to another. [1 + 4]
AI is thinking...
1.
x) Which one of the following is not java swing container?
a) Panel b) Tabbed Pane c) Scroll Pane d) Scroll bar
AI is thinking...
10. a) Define Collection Class. Explain different Wrapper classes and associated methods in java. [1+4]
b) Define AWT. Explain different types of Layout Managers in java. [1 + 4]
AI is thinking...
11. a) List and explain any five swing controls with their uses. [5]
b) Define JDBC. Write a program to display all records from a table of database. [1 + 4]
AI is thinking...