Java for my AP class
I taking AP computer Science (AB for 1337 h4x0rz
) next semester and i just found out that the nice people that makes the AP exams changed the language from C++ to Java!!!!!!!!!! Now I have to learn Java! Anyways my teacher gave a book so I can do some indepent studies but the books sources don't compile on the SDK so anyone nows a good book to learn Java?

0
Comments
The book I use in independent study is Java Software Solutions, AP Version (<A HREF="http://www.awprofessional.com/isapi/product_id~{4DE581DB-F181-4A42-9963-DC00C85A9D45}/catalog/product.asp" target=_blank>here</A>.) Frankly, there has to be a better book out there. The information presented is ok, but it is presented in a very bland, robotic manner. There are plenty of examples of code, but very little in the way of problems that you actually have to solve. Also, some concepts or classes are mentioned (for example, the number format class) that then seems to never get mentioned again in the book ;[.
As for your question about good Java books? I would say WROX should have some good books and Sams often has nice books too. Honestly though, the best book is the one that reads well to you and you can understand. Go to a book store and grab a few books and sit down with them and read a little bit from each and see which author has a style that best suits you.
karatekid here is an example:
//Program converts fahrenheit into celsius
import TerminalIO.KeyboardReader;
public class Convert {
public static void main(String [] args) {
KeyboardReader reader = new KeyboardReader();
double fahrenheit;
double celsius;
System.out.print("Enter degrees in Fahrenheit: ");
fahrenheit = reader.readDouble();
celsius = (fahrenheit - 32) * 5.0-9.0;
System.out.print("The equivalent in Celsius is ");
System.out.println(celsius);
reader.pause();
}
}
As you can see the teminalio doesn't even exist under the STANDARD java package! Making this book useless for the AP test (I think).
Also if you think your book is lame my is TEN times as worse and is very disorganize. Anyway the book is called Fundamentals of Java by Lambert and Osborne and is the WORSE book ever. I also think that Java sucks (not all the time) and I also prefer C++ over Java. At least I going to be able to program my own cell phone games when I finish
If you can't find that TerminalIO package (though a search in google should bring it up) I can send you the cs1 package. It is pretty straight forward, you don't even need to create a cs1 object, you can just call the methods though the class name (static methods.) On the down side, I am guessing TerminalIO does more than just read from the keyboard, while that is all the cs1 does.
Edit:// Actually, you can download TerminalIO <A HREF="http://shiegz.tripod.com/java/jfiles/TerminalIO.jar">here</A>
If you are doing independent studies try to rewrite some of the java libraies. It is really hard but you can view the source code of them too. You can learn more by trying to rewrite that after getting the basics down, I think.
If you are doing independent studies try to rewrite some of the java libraies. It is really hard but you can view the source code of them too. You can learn more by trying to rewrite that after getting the basics down, I think.