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
methods
:
Content language: English
Русский
Which statements are true about parameter transfer in Java (choose all acceptable variants)
methods
What will be the result of compilation and execution of the following code? import java.util.*; public class Test { void a1(Object... i){ System.out.println("[Object... i]"); } void a1(Integer... i){ System.out.println("[Integer... i]");; } public static void main(String... args){ a1(new Integer[19]); } }
methods
What will the following program write to the console? public class StringTest { public static void main(String[] arg){ test(new String[] { null }); } static void test(Object[] o){ System.out.print(1); } static void test(String o){ System.out.print(2); } static void test(String...o){ System.out.print(3); } static void test(Object...o){ System.out.print(4); } }
methods
← Prev
1
2
Next →
Sign Up Now
or
Subscribe for future quizzes