Logo

Java Questions Set 110:

Quiz Mode

Are vector and ArrayList is same

1
2

Solution:

How can we monitor a exception in java.

1
2
3
4

Solution:

The throw  is used for generating an exception manually 

1
2

Solution:

In which Java package are exception classes found?

1
2
3
4

Solution:

Which type parameter is used for a generic method to return and accept a number?

1
2
3
4

Solution:

Predict the output of the following Java code.

1
2
3
4

Solution:

In Java variables, if first increment of the variable takes place and then the assignment occurs. This type of operation is called

1
2
3
4

Solution:

If we add Enum constants to a TreeSet, what sorting order will it use?

1
2
3
4

Solution:

What will happen if two threads of the same priority are called to be processed simultaneously?

1
2
3
4

Solution:

public class output

    {

        public static void main(String args[])

        {

            Double a = new Double(400.789456);

       Double b = new Double(400.7894561); 

       int c = a.compareTo(b);

                System.out.print(c);

            

   }

    }

1
2
3
4

Solution: