Which of the following is not an integer?
What is the return type of the clear()
method of CopyOnWriteArrayList
in Java?
In which Java package do the Serializable and Externalizable classes belong?
int Indexof(object) is used to
Which of these is a method for testing whether the specified element is a file or a directory?
class GFG {
public static void main (String[] args) {
int[] arr=new int[]{0,1,2,3,4,5,6,7,8,9};
int n=16;
n=arr[arr[arr[--n/2]]]/2;
System.out.println((arr[++n]/2);
}
}
Predict the output of the following Java code.
class Abekus {
private static int a = 0;
public static void main(String args[]) {
System.out.println(fello());
}
static int fello() {
return ++a;
}
}
public class outputs
{
public static void main(String args[])
{
double a = 6.4;
int b = 10;
a = a % 55;
b = b % 10;
System.out.println(a+b%5);
}
}
Predict the output of the following Java code:
class Abekus {
public
static void main(String[] args)
{
int i = 10;
System.out.println(i);
}
static
{
int i = 20;
System.out.print(i + " ");
}
}
What is the output of the following Java code?
import java.util.*;
public class Abekus {
public static void main(String[] args) {
LinkedList<Object> l = new LinkedList<>();
l.add("a");
l.add("b");
l.add(55);
l.add(88);
System.out.println(l);
System.out.println(l.peek());
}
}