dequeue is a
Which of these methods is used to get the host of a URL?
Which of these is a mechanism for naming and visibility control of a class and its content.
//How many times 'abekus' is printed?
public class abekus {
public static void main(String[] args){
for(int i = 0; i<5; i++)
{
System.out.println("abekus");
i+=2;
}
}
}
class test{
public static void main (String[] args) {
int x=150;
byte b=(byte)x;
short s=(short)x;
System.out.println(b+" "+s);
}
}
What is the output of the following Java code?
class Output
{
public static void main(String args[])
{
int a = 1;
int b = 2;
int c = 3;
a |= 4;
b >>= 1;
c <<= 1;
a ^= c;
System.out.println(a + " " + b + " " + c);
}
}
Which of these statements about the main() method in Java is incorrect?
What is the purpose of the gc() method in Java?
Why do we use the yield()
method?
import java.util.*;
class output
{
public static void main(String args[])
{
LinkedList set = new LinkedList();
set.add(new Integer(3));
set.add(new Integer(8));
set.add(new Integer(5));
set.add(new Integer(1));
set.addFirst(new Integer(2));
set.addLast(new Integer(2));
Iterator i = set.iterator();
Collections.reverse(set);
Collections.shuffle(set);
set.remove();
i.next();
i.remove();
while(i.hasNext())
System.out.print(i.next() + " ");
}
}