Deque and Queue inherit from _____.
Predict the output of the following Java code.
Predict the output of the following Java code.
Which access specifier can be used for the declaration of a class or interface in Java?
public class abekus{
public static void main(String[] args){
int a = 0;
a +=5;
switch(a){
case 5: System.out.print("5");
case 10: System.out.print("10");
default: System.out.print("0");
}
}
}
Which three are valid method signatures in an interface?
class test {
public static void main (String[] args) {
int var1=9;
int var2=10;
if(++var1==--var2)
System.out.println(++var2);
else
System.out.println(--var1);
}
}
Predict the output of the following Java code:
import java.util.*;
public class Abekus {
public static void main(String[] args) {
Integer I[] = {2, 4, 6, 8, 10};
Collections.rotate(Arrays.asList(I), -1);
System.out.println(Arrays.toString(I));
}
}
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("Welcome to java course");
str.replace(6, 8, "for");
System.out.println(" " + str);
}
}
Predict the output of the following Java code:
class Abekus1 {
public Abekus1() { System.out.print(1); }
}
class Abekus2 extends Abekus1 {
public Abekus2() { System.out.print(2); }
}
class Abekus3 extends Abekus2 {
public Abekus3() { System.out.print(3); }
}
public class Abekusmain {
public static void main(String[] args) {
Abekus3 A = new Abekus3();
}
}