common runtime error
Common Runtime Error Question
Level: Beginner
Focus: Basic concepts, runtime errors
Here’s a piece of code that has been saved in a file called "JollyMessage.java":
// A jolly message is written to the screen!
class Jollymessage
{
public static void main(String[] args) {
//Write the message to the terminal window
System.out.println("Ho Ho Ho!");
}
}
The above code will produce a runtime error message. To put it another way, a mistake has been made but it won’t be picked up when the program is compiled, only when it is run. What is the mistake and what error will be returned when the compiled code is executed?
0 comments:
Post a Comment