class DrumKit {
boolean topHat = true;
boolean snare = true;
void playTopHat() {
System.out.println("ding ding da-ding");
}
void playSnare() {
System.out.println("bang bang ba-bang");
}
class DrumKitTestDrive {
public static void main(String [] asrgs) {
DrumKit d = new DrumKit();
d.playSnare();
d.snare = false;
d.playTopHat();
if (d.snare == true) {
d.playSnare();
}
}
}
}
--- Update ---
This code was taken directly from an activity in the headfirst java book, when run through geany, it says that I am not allowed to have a static inside and inner class??