Which of the following is not a Maven goal?
Which is a valid declaration of a float?
How many ways can we create a String object in Java?
Elements cannot be inserted in which position in an Arraylist?
Predict the output of the following Java code.
The comment that must begin with /* and end with */ is known as?
Which statement(s) about a method-local inner class in Java are true?
class test{
public static void main (String[] args) {
int sum = 0;
for (int i = 0, j = -2; i < 5 | j <= 5; ++i, j = i + 1)
sum += i;
System.out.println(sum);
}
}
Predict the output of the following Java code:
class Abekus {
int i = 40;
public static void main(String[] args)
{
Abekus o1 = new Abekus();
Abekus o2 = new Abekus();
o1.i = 30;
System.out.print(o1.i + " ");
System.out.println(o2.i);
}
}
Predict the output of the following Java code.
class Abekus {
int c = 0;
void A() throws Exception {
try {
c++;
try {
c++;
try {
c++;
throw new Exception();
}
catch(Exception e) {
c++;
throw new Exception();
}
}
catch(Exception e) {
c++;
}
}
catch(Exception e) {
c++;
}
}
void show() {
System.out.println(c);
}
public static void main(String[] args) throws Exception {
Abekus o = new Abekus();
o.A();
o.show();
}
}