Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DrumKit {
- boolean topHart = true;
- boolean snare = true;
- void playTopHat () {
- System.out.println("динь-динь");
- }
- void playSnare () {
- System.out.println("бабах");
- }
- }
- public class DrumKitTestDrive {
- public static void main (String [] args){
- DrumKit d = new DrumKit();
- d.playSnare();
- d.snare == false;
- d.playTopHat();
- if(d.snare == true){
- d.playSnare();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement