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);} }

🎲 Try a Random Question  |  Total Questions in Quiz: 139  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Java Basics Practice Test: Classes and Methods — practice the complete quiz, review flashcards, or try a random question.

Java Quiz on fundamentals of classes, methods basics, heap and garbage collection, object creation, constructors, access control, string class, method overloading and static keyword, command line arguments and recursion. Java Classes Static Class: A static class is a class that contains only static methods and variables. Static classes cannot be instantiated, and they are often used to create utility classes. Final Class: A final class is a class that cannot be extended. Final classes are often used to create classes that represent immutable data, such as the String class. Abstract Class:... Show more

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