Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class sound1 { //creates class
- static boolean sound2 = 0; //creates boolean and puts it at 0
- public static void soundup() { //creates a static void
- sound2=++ //increases boolean
- }
- public static void sounddown() { //creates another static void
- sound2=-- //decreases boolean
- }
- if sound2 > 100 { //if sound is above 100...
- sound2=-- //it goes down to 100
- }
- if sound2 < 0 { //if sound is below 0
- sound2=++ //it goes up to 0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement