Section 9.2 Forgetting a Semicolon
A common mistake in Java is to forget that every statement must end with a semicolon (
;).
The error "โ;โ expected" on line 7 of
Histo.java in Listingย 9.2.1 means that a semicolon is missing at the end of the statement Scanner data = null. In Java, every statement must be terminated with a semicolon (;) to indicate its completion. The arrow points to null because thatโs where the compiler expected to find the semicolon.
You have attempted of activities on this page.
