Home / MCQ Bank / Computer
Computer Miscellaneous In Java Difficulty: Medium

What will be the output of the following Java program? class Output { public static void main(String args[]) { int a1[] = new int[10]; int a2[] = {1, 2, 3, 4, 5}; System.out.println(a1.length + " " + a2.length); } }

Select the correct option to test your answer:

More Computer Questions

How can you declare a function in C that takes a variable number of arguments? Want your logo in the same position on every slide, automatically? Insert it on the In Java Networking, what is the purpose of the `ServerSocket` class? What does the binmode method do in Ruby file I/O? Which page directive should be used in JSP to generate a PDF page?