Which Java class can encapsulate an entire executing program?
Which class is the super class of the wrapper classes Double and Float?
Can we declare a class as abstract without having any abstract methods?
class test{
public static void main (String[] args) {
int a,b,c,d;
a=b=c=d=40;
a*=b/=c-=d+=5;
System.out.println(a+" "+b+" "+c+" "+d);
}
}
The error in the following code is :
byte b ;
b = 50 ;
b = b * 50 ;
What does the following code prints:
public class Test{
public static void main(String args[]){
int a=12,b=13,c=14;
switch(a){
case 14:
System.out.println(b);
default:
System.out.println(c);
}
}
}
Statement 1- dequeue() and peek() remove and return the next time in line
Statement 2- dequeue() and peek() return the next item in line
Statement 3- peek() removes and returns the next item in line while dequeue() returns the next item in line
Predict the output of the following Java code:
import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
String s1 = "Abekus";
String s2 = new String("Abekus");
System.out.print(s1 == s2);
System.out.println(s1 == s2.intern());
}
}
When does Overloading not occur?