I'm trying to learn Java right now by watching the Stanford course video with Mehran Sahami. I'm using both books advised by them: "Karel learns JAVA" and "The Art and Science of JAVA". The problem is that on the 2nd book (The Art and Science of JAVA) some of the codes do not work.
I'm afraid I might be doing something or maybe the source code is out of date. I don't know if it's even possible for the code to be out of date. So what I wanted to know is if the book is still a "good" resource of if I should find something more recent.
I will post one excerpt from the book for those who don't know the course, so you can evaluate the problem:
According to Eclipse, almost every line in this code has a problem. Starting with "import acm.program.*;
Have you added the proper JAR files to your build path? Without it, Eclipse cannot find the imported package. Therefore it cannot find class ConsoleProgram, which probably has methods println and readInt which can therefore also not be resolved. Add the JAR file and your code should start working.