a) String objects are immutable, they cannot be changed b) String object can point to some ...
View QuestionWhich of these constructors is used to create an empty String object?
a) String() b) String(void) c) String(0) d) None of the mentioned
View QuestionWhich of these method of class String is used to extract a single character from a String object?
a) CHARAT() b) chatat() c) charAt() d) ChatAt() Answer: c Explanation: charAt()
View QuestionWhich of this method of class String is used to obtain a length of String object?
a) get() b) Sizeof() c) lengthof() d) length() Answer: d Explanation: Method length() of ...
View QuestionWhich of these operators can be used to concatenate two or more String objects?
a) + b) += c) & d) || Answer: a Explanation: Operator + is used ...
View QuestionWhich of these class is superclass of String and StringBuffer class?
a) java.util b) java.lang c) ArrayList d) ...
View QuestionDoes Java support multiple level inheritance?
a) True b) False Answer: a Explanation: Java supports multiple level inheritance through implementing multiple interfaces.
View QuestionWhat would be the result if a class extends two interfaces and both have a method with same name and signature? Lets assume that the class is not implementing that method.
a) Runtime error b) Compile time error c) Code runs successfully d) First called method is executed successfully Answer: ...
View QuestionWhich of the following is used for implementing inheritance through class?
a) inherited b) using c) extends d) implements Answer: c Explanation: Class can be extended using extends keyword. One ...
View QuestionWhich of the following is used for implementing inheritance through an interface?
a) inherited b) using c) extends d) implements Answer: d Explanation: Interface is implemented using implements keyword. A concrete ...
View Question