Java is platform-dependent
The navigable map is a
Jvm finds the .class files without uncompressing this JAR.
Which class is used to create user-defined exceptions?
Which of these packages contains the exception Stack Overflow in Java?
public class output{
public static void main(String args[]){
int a=100;
int b=120;
int result=0;
result= (a + ++b)+1+a++;
System.out.println(result);
}
}
Predict the output of the following Java code.
class Abekus {
public static void main(String[] args)
{
char ch[][] = { { 'a', 'b', 'd' }, { 'c', 'e', 'f', 'g' } };
for (int i = 0; i < 2; i++) {
for (int j = 0; j < ch[i].length; j++)
System.out.print(ch[i][j] + " ");
}
}
}
Predict the output of the following Java code.
import java.util.*;
public class Abekus {
public static void main(String[] args) {
Formatter F = new Formatter();
F.format("%(d", 345);
System.out.println(F);
F = new Formatter();
F.format("%(d", -230);
System.out.println(F);
}
}
What will be the output of the following Java code?
class NewThread extends Thread
{
NewThread()
{
super("My Thread");
start();
}
public void run()
{
System.out.println(this);
}
}
class MultithreadedProgramming
{
public static void main(String[] args)
{
new NewThread();
}
}
Predict the output of the following Java code:
public class Abekus {
public static void main(String[] args) {
Complex c1 = new Complex();
Complex c2 = new Complex(c1);
System.out.println(c2);
}
}
class Complex {
private double r, i;
public String toString() {
return "(" + r + " + " + i + "i)";
}
Complex(Complex c) {
r = c.r;
i = c.i;
}
}