Which of these method return a pseudorandom number?
which of these methods is a rounding function of math class
Which of these methods deletes all the elements from the invoking collection?
Predict the output of the following Java code that uses a HashSet.
Predict the output of the following Java code:
public class Output {
public static void main(String[] args) {
int x = 5;
int y = 7;
int z = x++ * ++y;
System.out.print(z);
}
}
class test {
public static void main (String[] args) {
int x,y=10;
x=5;
{
y=6;
System.out.println(++x+" "+y);
}
System.out.println(x+" "+y);
}
}
Which of the following is not true?
How to get the difference between 2 dates in Java?
Select the correct option for the following Java code.
class Abekus {
public static void main(String[] args)
{
byte a = 20;
byte b = 30;
int c = a + b; // line 5
byte d = b - a; // line 6
System.out.println(c);
System.out.println(d);
}
}
Predict the output of the following Java code:
import java.lang.*;
public class Abekus {
public static void main(String[] args)
{
short s = 345;
Short s_ = new Short(s);
System.out.println(s_.getClass().getName());
System.out.println(s_.toString().getClass().getName());
}
}