How many .class files will be created for the following Java code?
Which exception is thrown by methods of System class?
Which of this is not a type of inheritance?
Which of the following allows us to call generic methods without specifying the type parameter?
class test {
public static void main (String[] args) {
System.out.println((100/50.0)*Integer.parseInt("5") + 50);
}
}
Which one is NOT true for thread?
public class output{
public static void main(String args[]){
int a=100;
int b=120;
int result=0;
result= ++a + b++;
System.out.println(result);
}
}
public class outputs
{
public static void main(String args[])
{
int a=10;
int b=20;
int c=30;
int sum=0;
sum= sum + ++a*++b*++c;
System.out.println(sum);
}
}
What is the purpose of Generic types in Java?
import java.util.*;
class output
{
public static void main(String args[])
{
LinkedList obj = new LinkedList();
obj.add("A");
obj.add("B");
obj.add("C");
obj.addLast(new Integer(25));
obj.removeFirst();
obj.removeLast();
System.out.println(obj);
}
}