Which keyword is used to access the current object?
Which character encoding technique is used by the isDefined()
method?
Which of these methods is used to get the x-coordinate of the mouse?
Which of the following is the method of the Integer wrapper class to convert the value of an object into an int?
What will be the output of the following Java code?
class isNaN_output
{
public static void main(String args[])
{
Double d = new Double(1 / 0.);
boolean x = d.isNaN();
System.out.print(x);
}
}
Which is the correct output?
public class abekus
{
public static void sum(int a, int b){
System.out.print(a+b+" ");
}
public static void main(String[] args) {
sum(10,10);
sum(-11,-11);
}
}
class test{
public static void main (String[] args) {
int x=10,y=15;
if(x++<10 || --y<15)
{
x--;
}
else
{
y++;
}
System.out.println(x+" "+(~y));
}
}
Predict the output of the following Java code:
import java.util.Scanner;
public class MyClass
{
public static void main(String args[])
{
StringBuffer str1 = new StringBuffer("Engineer");
str1.deleteCharAt(5);
System.out.println(" " + str1);
}
}
import java.util.*;
public class outputs
{
public static void main(String args[])
{
LinkedList list = new LinkedList();
list.add(new Integer(2));
list.add(new Integer(8));
list.add(new Integer(5));
list.add(new Integer(1));
Iterator i = list.iterator();
Collections.reverse(list);
while(i.hasNext())
System.out.print(i.next() + " ");
}
}