Java - Online Test - Main method - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Main method' - 4 questions found


How can we execute a Java class independently if it doesn't have a static main method ?Core Java
By initiating the flow in any of the static method
By initiating the flow in any of static block
By initiating the flow in any other instance method named as main
By initiating the flow in any other instance method named as main and making it final

  main method  java

Which of the following is false about main method ?Core Java
It should be declared public and static
it should have only 1 argument of type String array
We can override main method
We can overload main method

  java  main method

Which of the following keyword is expected with main method declaration ?Core Java
Final
Static
Volatile
Transient

  main method

Which of following about main method is not true ?Core Java
We can have multiple methods named main in a class
We can have var args with the main method
We can overload main method
We can override main method

  main method







comments powered by Disqus