What is the meaning of “write once, run anywhere†in Java?
Java programs are designed to run only in web browsers and, thus, can run wherever there is a browser.
It is a marketing statement because Java programs must be compiled for a specific platform in order to run.
Java programs can run on any Java Virtual Machine without being recompiled.
Java programs, after being compiled, can run on any platform or device even without a Java Virtual Machine.
Given the code fragment:
Which code fragment can be inserted at line n1 to enable the code to compile?
new int num[];
int[] num;
int[10] num;
int num[10];
Which package would you import to use the Random class?
java.io
java.math
java.util
java.lang
What is the result?
10
11
12
13
Given:
300
100
200
A compilation error occurs.