a) main() b) recursive() method c) Any method d) System defined methods ...
View Question
What will be the output of the following Java program?
class string_class
{
public static void main(String args[])
{
String obj = “hello”;
String obj1 = “world”;
String obj2 = “hello”;
System.out.println(obj.equals(obj1) + ” ” + obj.equals(obj2));
}
}
What will be the output of the following Java program? class string_class ...
View Question
What will be the output of the following Java program?
class string_class
{
public static void main(String args[])
{
String obj = “hello”;
String obj1 = “world”;
String obj2 = obj;
obj2 = ” world”;
System.out.println(obj + ” ” + obj2);
}
}
What will be the output of the following Java program? class string_class ...
View Question
What will be the output of the following Java program?
class string_class
{
public static void main(String args[])
{
String obj = “I LIKE JAVA”;
System.out.println(obj.length());
}
}
What will be the output of the following Java program? class string_class ...
View Question
What will be the output of the following Java program?
class string_class
{
public static void main(String args[])
{
String obj = “I LIKE JAVA”;
System.out.println(obj.charAt(3));
}
}
What will be the output of the following Java program? class string_class ...
View Question
What will be the output of the following Java program?
class string_demo
{
public static void main(String args[])
{
String obj = “I” + “like” + “Java”;
System.out.println(obj);
}
}
What will be the output of the following Java program? class string_demo ...
View QuestionWhich of the following statements are incorrect?
a) String is a class b) Strings in java are mutable c) Every string is an object ...
View QuestionWhich of these method of String class can be used to test to strings for equality?
a) isequal() b) isequals() c) equal() d) equals() Answer: d
View QuestionWhich of these keywords is used to refer to member of base class from a subclass?
a) upper b) super c) this d) none of the mentioned Answer: b Explanation: Whenever a subclass needs ...
View QuestionWhich of these method of String class is used to obtain character at specified index?
a) char() b) Charat() c) charat() d) charAt() Answer: d
View Question