To make your code easier to read I decided to format it.
In the class DVDPlayer you are defining one instance variable for all objects of type DVDPlayer. This instance variable is declared as boolean canRecord = false;. This means for every object of type DVDPlayer you create they will all have a default instance variable of type boolean named canRecord that is set to false. You can, if need be, change this instance variable by using an object of type DVDPlayer. This exact process happens in your code. Where do you change it? Take a look at lines 15 and 16. At line 15 you create an object of type DVDPlayer and name it d. When this object is created it is automatically given the default instance variable canRecord that you defined. On line 16 you use the object d that you just created and change its instance variable canRecord from false to true by using d.canRecord = true. So that's how you change canRecord from false to true. If you wanted, you could bring it back by inserting a statement d.canRecord = false; and canRecord for object d is set back to false.
To answer you second question, there really is nothing as a main class. The main method is a very important piece to every
Java program as it is the entry-point for the program. When you compile your program the Java compiler will look for your main method as a starting point. You could say that whatever class contained your main method is your main class, but that isn't a standard.
In addition, I would like to point out some errors in your code.
• Line 17, you invoke a method playDVD() on object d. Looking throughout the two classes, now playDVD() method has not been defined.
• Line 19, there is no instance variable defined as recordDVD.
• Line 21, you have made a typo. There is a comma where there should be a dot operator.
Best of luck, my friend. Feel free to post back with any questions you may have. Java Ranch is a friendly place for Java Greenhorns so soak all this constructive criticism in and learn lots from it all

.