Quizzes
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
Main method
:
Content language: English
Русский
What will be printed out as a result of the following code compilation and execution? public class Quest { public static void main() { System.out.print("A"); } public static void main(String args) { System.out.print("B"); } public static void main(String[] args) { System.out.print("C"); } }
Main method
Select the only correct program output when it is run by a "java Test 1 two 3" command. public class Test { static public void main(String[] args) { try { int k = Integer.parseInt(args[1]); System.out.println(args[k]); } catch (Exception e) { System.out.println(e); } } }
Main method
Select all the correct ways to declare method main (java 5 and above).
Main method
What will be displayed by the following code? public class test { public static void main(int[] args){ System.out.println("Hi, World!"); } public static void main(String... args){ System.out.println("Hello, World!"); } }
Main method
Given class public class Cycle { public static void main(String[] bicycle) { System.out.println(bicycle[0]); } } and the command line of it's launch >java Cycle one two Select the only correct version of the application display.
Main method
public class Class1 { public static void main(String [] args) { System.out.print(args[0] + args[1]); System.out.println(args[1]); } } Specify a result of the given code execution if it is executed with the following line java Class1 Hello world !!!
Main method
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes