Collection.sort(listobj) is used to sort elements of ArrayList
String class belongs to __________ package.
public class operators {
public static void main(String[] args)
{
int x = 5, y = 8;
System.out.println(""+x + y);
}
}
Java is
What is the output of the following Java program?
class GFG {
public static void main (String[] args) {
byte x = 32;
int i;
byte y;
i = x << 2;
y = (byte) (x >>>2);
System.out.print(i + " " + y);
}
}
What will be the output of the following Java code?
class Abekusmain
{
public static void main(String args[])
{
String s1 = "Abekus";
String s2 = "Abekus";
System.out.println("s1 == s2 is:" + (s1 == s2));
}
}
what should be the output of this code block?
public class abekus
{
public static void main(String[] args) {
int arr[] = {
1,
2,
3,
4,
5
};
for (int i = 0; i < 5; i++) {
System.out.print(arr[i++]);
}
}
}
What is an Exception?
What will be the output of the following Java program?
import java.util.*;
class I
{
public static void main (String[] args)
{
Object i = new ArrayList().iterator();
System.out.print((i instanceof List)+",");
System.out.print((i instanceof Iterator)+",");
System.out.print(i instanceof ListIterator);
}
}