Question

Consider the following Java code: public class LengthMix {     public static void main(String[] args) {         int[] numbers = {10, 20, 30, 40};         String message = "Java";         System.out.println(numbers.length + message.length());     } } What will be the output of this program?

A 4
B 8
C 10
D 12
E Compile-time error
Practice Next

Hey! Ask a query