Order are same or not
try{}
catch(){}
finally{}
Generics doesn't work with which of the following
Which value is returned under the case of normal termination of a program?
class <T1, T2, …, Tn> name[T1, T2, …, Tn] { /* … */ } is used to define genric method
Which of this is not a segment of memory in Java?
What is the scope of the default access modifier in java?
class test{
public static void main (String[] args) {
int x=1,y=16;
x=x>>2;
y=y>>x;
System.out.println(~x>>2);
}
}
What will be the output of the program?
class Test
{
public static void main(String [] args)
{
int x= 0;
int y= 0;
for (int z = 0; z < 5; z++)
{
if (( ++x > 2 ) && (++y > 2))
{
x++;
}
}
System.out.println(x + " " + y);
}
}
Predict the output of the following Java code.
public class Abekus {
public static void main(String args[]) {
String s1 = "1";
String s2 = s1;
s1 += "2";
System.out.println(s1 + " " + s2 + " " + (s1 == s2));
StringBuffer s3 = new StringBuffer("1");
StringBuffer s4 = s3;
s3.append("2");
System.out.println(s3 + " " + s4 + " " + (s3 == s4));
}
}