catch is used for the block to be examined for exceptions
component is used to compile, debug and execute java program
Terminate() methods of a Thread class is used to suspend a thread for a period of time
Which data structure should be used when the number of elements is fixed?
Which method is used to concatenate 2 strings in the StringBuffer class?
What exception will be thrown when the given code is executed?
What will be the order of precedence for the following operators - (lowest to highest)
a. ^
b. &
c. ?:
public class Demo123{
public static void main(String args[]){
String s1= new String("hello");
String s2= new String("Abekus");
System.out.println(s2==s1);
}
}
Select the wrong one out
Predict the output of the following Java code:
import java.util.Scanner;
public class MyClass {
public static void main(String args[]) {
StringBuffer str = new StringBuffer("InFormal");
int index = str.indexOf("For");
System.out.println(" " + index);
}
}