Logo

Java Questions Set 243:

Quiz Mode

 clone() : This method returns a shallow copy of this Linked List.

1
2

Solution:

How can you sort an array in Java?

1
2
3
4

Solution:

Which Java component is responsible for converting bytecode into machine-specific code?

1
2
3
4

Solution:

peak operation can be used to.

1
2
3
4

Solution:

Which of this class is not related to input and output stream in terms of functioning?

1
2
3
4

Solution:

Offerfirst()  used to 

1
2
3
4
5

Solution:

What will be the output of the following Java code?

1
2
3
4

Solution:

Statement 1- All wrapper class are the comparable type

Statement 2- String is the comparable type

 Statement 3- Date is the comparable type

 Statement 4-All classes are the comparable type

1
2
3
4
5

Solution:

Which of the following statements about string methods is correct?

1
2
3
4

Solution:

import java.util.*;

    public class output 

    {

        public static void main(String args[]) 

        {

            LinkedList list = new LinkedList();

            list.add(new Integer(2));

            list.add(new Integer(8));

            list.add(new Integer(5));

            list.add(new Integer(1));

            Iterator i = list.iterator();

            Collections.reverse(list);

   Collections.sort(list);

            while(i.hasNext())

       System.out.print(i.next() + " ");

        }

    }

1
2
3
4

Solution: