Question: Q1. 1 ________________ is a name given to a variable, class or method A . Constant B .Reference C . Identifier D . Modifier 2
Q1.
1________________ is a name given to a variable, class or method
A. Constant
B.Reference
C. Identifier
D. Modifier
2. Which of the following cannot be used as the first letter to form a valid java identifier
(choose all that apply)
A. S
&B.
C. Any Alphabet (A-Z or a-z)
D. Any Number
. When a data type must contain decimal numbers, assign the type 3.
A. int
B. char
C. double
D. long int
Is the following way of commenting correct in Java ? 4.
/*My Comment 1
My Comment 2*/ */
*/
A. True
B. False
. Which looping process checks the test condition at the end of the loop 5.
A. for
B. while
C. do-while
D. no looping process checks the test condition at the end
. 6. What value is stored in num at the end of this looping?
for (int num-1; num < 5; num++)
A. 1
B.4
C.5
D. 6
=In Java, 5/2 .7
A. 2
B. 2.5
C.3
. Array indexing always starts with the number 8.
A.O
B.1
C. 2
D./0
.What are the pillars of OOPS concept ? 9
A. Abstraction, Inheritance, Encapsulation, Polymorphism
B. Atomicity, Inheritance, Encapsulation, Polymorphism
C. Abstraction, Inheritance, Polymorphism
D. None of the Above
. 10. public class Test{}
What is the prototype of the default constructor ?
A. Test()
B. Test(void)
C. public Test()
D. public Test(void)
.Choose best option that describes Constructor.11
A. Have no return type
B. Use name of the class and have no return type C. Use name of the class
D. None of the above
? What is the keyword used to inherit a class 12.
A. inherit
B: extends
C. inheritance
D. extend
? 13. Which member of the superclass is never accessible to the subclass
A. Public member
Protected member B.
C. Private member
D. All of the mentioned
Which class cannot create its instance ?.14
A. Parent class
B. Nested class
C. Anonymous class
D. Abstract class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
