Like Greg said, the API is your best friend: Java Platform SE 8

You also need some familiarity with OOP. The Graphics class is an abstract class, and Graphics2D is the concrete implementation of...