RecErrorsSolutions

RecErrorsSolutions - System.out.println ("Hello,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution to Recognizing Errors 2. Hello.java:7: class Helo is public, should be declared in a file named Helo.javapublic class Helo ^ 1 error 3. There is no error message because a string is not an identifier -- it can contain any characters. The program now prints Helo instead of Hello. 4. Hello.java:14: unclosed string literal
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println ("Hello, World!); ^ Hello.java:14: ')' expected System.out.println ("Hello, World!); ^ 2 errors 5. There were 5 errors, but they weren't very helpful in determining that the first " was missing. 6. Hello.java:14: ';' expected System.out.println ("Hello, World!") ^ 1 error...
View Full Document

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Ask a homework question - tutors are online