Java
Select all ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Select all the correct ways to declare method main (java 5 and above).
public void main(String args[])
{...}
public static void main(String args[])
{...}
public static void main(String[] args)
{...}
public static void main(String ... args)
{...}
public static int main(String args[])
{...}
public static int main{String args[]}
{...}
Explanation
Since Java 5 operator ... appeared, which represents an array so
public static void main (String ... args) {...}
will also be the right option.
Main method
3
(3)
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
What will be printed out as a result of the following code compilation and execu...
Select the only correct program output when it is run by a "java Test 1 two 3" c...
What will be displayed by the following code? public cl...
Given class public class Cycle { public static voi...
public class Class1 { public static void main(String...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment