Java
Java
00
Flag question
Question text
Which of these keywords is used to prevent content of a variable from being modified?
Select one:
a. final
b. last
c. constant
d. static
Feedback
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 6 6
b. 6.4 6.4
c. 6.4 6
d. 4 6.4
Feedback
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. Default constructor is called at the time of declaration of the object if a constructor has not been
defined
c. finalize() method is called when an object goes out of scope and is no longer needed
d. finalize() method must be declared protected
Feedback
Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. int
b. float
c. void
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. Method
b. Object
Feedback
Flag question
Question text
Which one of these lists contains only Java programming language keywords?
Select one:
Question 7
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. method
b. native
c. subclasses
d. reference
e. array
Feedback
Your answer is correct.
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
b. private members of class can only be accessed by other members of the class
c. private members of class can be inherited by a sub class, and become protected members in sub
class
d. protected members of a class can be inherited by a sub class, and become private members of the
sub class
Feedback
Question 9
Correct
Mark 1.00 out of 1.00
Flag question
Question text
c. Copy of argument is made into the formal parameter of the subroutine and changes made on
parameters of subroutine have effect on original argument
d. Reference to original argument is passed to formal parameter of the subroutine and changes made
on parameters of subroutine have effect on original argument
Feedback
Question 10
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 2 3
b. 3 3
c. Runtime Error
d. Compilation Error
Feedback
Question 11
Correct
Flag question
Question text
Which four options describe the correct default values for array elements of the types indicated?
1. int -> 0
2. String -> "null"
3. Dog -> null
4. char -> '\u0000'
5. float -> 0.0f
boolean -> true
Select one:
a. 1,2,3,4
b. 1,3,4,5
c. 2,4,5,6
d. 3,4,5,6
Feedback
Question text
a. Methods
b. Constructors
c. Both a & b
Feedback
Flag question
Question text
a. if
b. switch
c. if & switch
Flag question
Question text
a. 0
b. 1
c. 4
d. 5
Feedback
Flag question
Question text
Feedback
Flag question
Question text
a. True
b. False
Feedback
Question text
a. 10
b. 5
c. 2
d. 20
Feedback
Flag question
Question text
a. 1,2,4
b. 1,3,6
c. 3,5
d. 5 Only
Feedback
Flag question
Question text
Which of these method of class String is used to extract a single character from a String object?
Select one:
a. CHARAT()
b. chatat()
c. charAt()
d. ChatAt()
Feedback
Flag question
Question text
Feedback
Question 21
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
a. 3 3
b. 2 3
c. Runtime Error
d. Compilation Error
Feedback
Question 22
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Question 23
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
a. False
b. True
Feedback
Question 24
Correct
Mark 1.00 out of 1.00
Flag question
Question text
b. Thread[New Thread,5]
c. Thread[main,5,main]
d. Thread[New Thread,5,main]
Feedback
Question 25
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 1,2,4
b. 2,4,5
c. 2,3,4
Question 26
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Can there be an abstract class with no abstract methods in it?
Select one:
a. Yes
b. No
Feedback
Question 27
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. if()
b. for()
c. continue
d. break
Feedback
Question 28
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. class
b. object
c. variable
d. method
Feedback
Question 29
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which keyword is used by method to refer to the object that invoked it?
Select one:
a. import
b. catch
c. abstract
d. this
Feedback
Question 30
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. The left shift operator, <<, shifts all of the bite in a value to the left specified number of times
b. The right shift operator, >>, shifts all of the bite in a value to the right specified number of times
c. The left shift operator can be used as an alternative to multiplying by 2
d. The right shift operator automatically fills the higher order bits with 0
Feedback
Question 31
Correct
Flag question
Question text
Which one of the following will declare an array and initialize it with five numbers?
Select one:
b. int [] a = {23,22,21,20,19};
Feedback
Flag question
Question text
b. String
c. Float
d. Unsigned
Feedback
Flag question
Question text
Feedback
Question text
a. 1
b. 2
c. 3
d. 4
Feedback
Flag question
Question text
a. 9
b. 8
c. Compilation error
d. Runtime error
Feedback
Flag question
Question text
a. Yes
b. No
Feedback
Flag question
Question text
Which of the following package stores all the standard java classes?
Select one:
a. lang
b. java
c. util
d. java.packages
Feedback
Flag question
Question text
a. 7 2
b. 7 7
c. 7 5
d. 5 2
Feedback
Flag question
Question text
a. 100
b. 150
c. 200
d. 250
Feedback
Flag question
Question text
b. &=
c. |=
d. <=
Feedback
Flag question
Question text
a. 1,2 and 3
b. 2,3 and 4
c. 3,4 and 5
d. 4,5 and 6
Feedback
Question 42
Correct
Mark 1.00 out of 1.00
Flag question
Question text
b. NULL
d. Garbage
Feedback
Question 43
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 5
b. 6
c. 7
d. 8
Feedback
Question 44
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 42 42
b. 42 43
c. 42 -43
d. 42 43
Feedback
Question 45
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
d. when object of class is declared, each object contains its own copy of static variables
Feedback
Question 46
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass
B?
Select one:
a. super(void);
b. superclass.();
c. super.A();
d. super();
Feedback
Question 47
Correct
Mark 1.00 out of 1.00
Flag question
Question text
a. 0
b. 1
c. 2
d. Compilation Error
Feedback
Question 48
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Question 49
Correct
Mark 1.00 out of 1.00
Flag question
Question text
b. private members of class can only be accessed by other members of the class
c. private members of class can be inherited by a sub class, and become protected members in sub
class
d. protected members of a class can be inherited by a sub class, and become private members of the
sub class
Feedback
Question 50
Correct
Mark 1.00 out of 1.00
Flag question
Question text
c.getChars(start,end,s,0);
System.out.println(s);
}
}
Select one:
b. i love ja
c. lo i lo
d. llo i l
Feedback