Logo

Java Questions Set 195:

Quiz Mode

toString() method define in

1
2
3

Solution:

How to use environment properties in the class?

1
2
3
4

Solution:

When does a exception generally occur in java.

1
2
3
4

Solution:

Which method of the Process class can be used to terminate a process?

1
2
3
4

Solution:

Which of the following statements about Ant is not true?

1
2
3
4

Solution:

How many times 'abekus' is printed?

public class abekus {

public static void main(String[] args){

 for(int i = 0; i<5; i=5 )

 {

 System.out.println("abekus");

 }

}

}

1
2
3
4

Solution:

What are the Magic methods in Java?

1
2
3
4

Solution:

What is Association in Java?

1
2
3
4

Solution:

What will be the output of the following program?

public class Main 

   {

       public static void main(String args[]) 

           {

       int arr[] = new int[] {0 , 1, 2, 3, 4, 5, 6, 7, 8, 9};

       int n = 8;

               n = arr[arr[n] / 2];

       System.out.println(arr[n] / 2);

           } 

   }

1
2
3
4

Solution:

 class test

{

         public static void main(String[] args)

         {

                    for(int i=0;true!=false;i++)

                    {

                              System.out.println("Hello world!!!");

                              break;

                     }

         }


}


1
2
3
4

Solution: