I am currently in a Java class at the University of Phoenix. I have found a few good books if you were interested. The book we are using as a text book is "SAMS Teach Yourself Java 2 in 24 Hours". This book is okay for the beginners, but if you really want help with coding try out "Java 2 Primer Plus" by Sams or Core Java 2 (Volume 1)" by Sunsoft Press. Both of the later two books mentioned are excellent for both the beginner and the advanced programmers.
There is also a Stanford University course on Programming Methodology and they teach Java. The Lectures are actual class lectures of a professor teaching his students. From lecture 1 all the way through to about lecture 29 or some where around that. Each video is about 45 minutes in length. You can go to the site mentioned in the videos and download all the available documents except for the Karel learns Java and The Art of Science in Java by Eric Roberts books. If you search, you can find them on the net. Th Art of Science In Java is a preliminary version that is very good.
If you are really interested in learning Java, and are serious about it. I would check these videos out on you tube and follow the Syllabus, do the exercises, and read the assignments.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: