Java Multiple Choice Questions With Answers set-8
1. Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself.
A) super
B) final
C) this
D) either super or this
2. If a variable is declared final, it must include ...................... value.
A) integer
B) no
C) initial
D) float
3. State true or false.
i) Jpanel is a class included in awt package.
ii) Anonymous classes are mostly used for event handling.
iii) Names of anonymous classes must be unique
iv) JOptionPane is an inner class
A) i-false, ii-false, iii-true, iv-true
B) i-true, ii-false, iii-true, iv-false
C) i-false, ii-true, iii-false, iv-false
D) i-true, ii-false, iii-false, iv-true
4. In java, string is a .............
A) primitive data type
B) abstract data type
C) combination of boolean
D) None of the above
5. Methods can be overloaded with a difference only in the type of the return value ..
A) Not supported
B) False
C) True
D) None of the above
6. Each method in a java class must have a unique name .
A) Not necessary
B) True
C) False
D) None of the above
7. State true or false.
i) comparisons precede logical operations in java
ii) assignment operations succeed increment operations
iii) arithmetic operations succeed comparisons
iv) x precede +
A) i-true, ii-true, iii-false, iv-true
B) i-true, ii-false, iii-true, iv-false
C) i-false, ii-true, iii-false, iv-false
D) i-true, ii-false, iii-false, iv-true
8. It is important feature of java that it always provides a default constructor to a class.
A) Not supported
B) False
C) True
D) None of the above
9. ....................... is the key to ..................
A) Serialization, persistence
B) Persistence, inheritance
C) Inheritance, object
D) Persistence, serialization
10. State true of false.
i) Public can only be assigned to class
ii) Protected protects a statement
iii) Protected method is never accessible outside the package
iv) Friendly variable may be accessible outside class
A) i-true, ii-true, iii-false, iv-true
B) i-true, ii-false, iii-true, iv-false
C) i-false, ii-true, iii-false, iv-false
D) i-true, ii-false, iii-false, iv-true
Answers:
1. C) this
2. C) initial
3. C) i-false, ii-true, iii-false, iv-false
4. B) abstract data type
5. B) False
6. A) Not necessary
7. A) i-true, ii-true, iii-false, iv-true
8. C) True
9. A) Serialization, persistence
10.C) i-false, ii-true, iii-false, iv-false
You Might also view the following Related Posts
- Solved MCQ of Java Set-1
- MCQ of Java with answer set-2
- Solved MCQ of Java for Java Proficiency test set-3
- Solved MCQ of Java set-4
- Java MCQ Questions and Answers set-5
- Java Multiple Choice Questions With Answers set-6
- MCQ of Java With Answer set-7
You can view the following other posts
- Solved MCQ of Internet and HTML set-1
- Solved MCQ of C set-1
- Solved MCQ of DBMS Set - 3
- Solved MCQ of System Analysis and Design Set-3
- Solved MCQ of Data Structure Set - 2
- Solved MCQ of SQL Server set-1
- MCQ of C++ with answer Set-2
- MCQ of Computer Networking with answer set-4
For other more Multiple Choice Questions (MCQs): Click Here
Java Multiple Choice Questions With Answers set-8
Reviewed by Unknown
on
12:50 ص
Rating:
ليست هناك تعليقات: