Logo

Java Questions Set 39:

Quiz Mode

Stack is an Interface

1
2

Solution:

Arrays always store in Sequential memory location

1
2

Solution:

delete() method deletes all the elements from invoking collection 

1
2

Solution:

What is an ORM stands for?

1
2
3
4

Solution:

Which method is used to create a directory with file attributes?

1
2
3
4

Solution:

When one of the operands in an expression is a real number and the other is an integer, the expression is called:

1
2
3
4

Solution:

What will be the output of the following Java code?

class Abekus {

public static void main(String[] args) {

int j = 1;

do {

for (int i = 1; i++ < 2;)

System.out.println(i);

} while (j++ < 3);

}

}

1
2
3
4

Solution:

What will be the output of the following Java code?


class Output

{

public static void main(String[] args)

{

String a = "hello i love java";

System.out.println(a.indexOf('i') + " " + a.indexOf('o') + " " + a.lastIndexOf('i') + " " + a.lastIndexOf('o'));

}

}

1
2
3
4

Solution:

Which of the following is true about interfaces in Java?

1
2
3
4
5

Solution:

What will be the output of the program?

public class X
{
   public static void main(String [] args)
   {
       try
       {
           badMethod();  
           System.out.print("A");
       }  
       catch (Exception ex)
       {
           System.out.print("B");
       }  
       finally
       {
           System.out.print("C");
       }  
       System.out.print("D");
   }  
   public static void badMethod() {}

1
2
3
4

Solution: