Which class stores items as a key-value pair?
Which of these is the process of writing the state of an object to a byte stream?
class test{
public static void main (String[] args) {
short s = 1000;
s *= 100;
System.out.println(s);
}
}
What will be the output of the following Java program that retrieves the last modified date of a web page?
Which of the following does not belong: If a class inherits from some other class, it should-
Predict the output of the following Java code:
class Abekus
{
public static void main(String[] args)
{
Double o = new Double("4.8");
int a = o.intValue();
byte b = o.byteValue();
float d = o.floatValue();
double c = o.doubleValue();
System.out.println(a + b + c + d );
}
}
Predict the output of the following Java code.
class Abekus {
public static void main(String[] args)
{
double d1 = 45.5678;
double d2 = 23.9878;
double d3 = 679.3457;
System.out.println(d1);
System.out.println(d2);
System.out.println(d3);
}
}
What is the meaning of ResultSet.TYPE_SCROLL_INSENSITIVE
in Java?
Statement 1- hasNext() methods can be used to move to the next element in a collection
Statement 2- move() methods can be used to move to the next element in a collection
Statement 3- shuffle() methods can be used to move to the next element in a collection
Statement 4- next() methods can be used to move to the next element in a collection
What will be the output of the program?
class Exc0 extends Exception { }
class Exc1 extends Exc0 { } /* Line 2 */
public class Test
{
public static void main(String args[])
{
try
{
throw new Exc1(); /* Line 9 */
}
catch (Exc0 e0) /* Line 11 */
{
System.out.println("Ex0 caught");
}
catch (Exception e)
{
System.out.println("exception caught");
}
}
}