OutOfMemoryError exception is thrown when java is out of memory
Which of these keywords are used to define an abstract class?
Statement 1 - String class has 13 constructors.
Statement 2 - String class has 60 methods.
What is the output of the following Java code?
class Test {
public static void main(String[] args) {
int x = 8;
System.out.println(++x * 3 + " " + x);
}
}
public class Demo123{
public static void main(String args[]){
int i =4;
if(i==4);
System.out.println("Abekus");
}
}
Operands of Arithmetic operations
Statement 1-Character
Statement 2-Numeric
Statement 3-Boolean
what should be the output of this code block?
public class abekus {
public static void main(String[] args) {
char[] a = {
'A',
'S',
'I',
'S',
'H'
};
int i = 4;
do {
System.out.print(a[i]);
i--;
} while (i > 0);
}
}
What is the output of the following code?
class Test {
public static void main(String[] args) {
int a, b, c, d;
a = b = c = d = 20;
a += b -= c *= d /= 20;
System.out.println(a + " " + b + " " + c + " " + d);
}
}
What is the correct output of the following java program?
class Abekus {
public static void show() {
System.out.println("Abekus::show() called");
}
}
class Derived extends Abekus {
public static void show() {
System.out.println("Derived::show() called");
}
}
public class Main {
public static void main(String[] args) {
Abekus a = new Abekus();;
a.show();
}
}