Question: Assume you write a program that uses the Random class but you fail to include an import statement for java.util.Random or java.util.*. What will happen
Assume you write a program that uses the Random class but you fail to include an import statement for java.util.Random or java.util.*. What will happen when you attempt to compile and run your program?
| The program won't run but it will compile with a warning about missing the class. | ||
| The program won't compile and you'll receive a syntax error about the missing class. | ||
| The program will compile but you'll receive a warning about the missing class. | ||
| The program will encounter a run-time error when it attempts to access any member of the Random class. | ||
| none of these |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
