Advertisement
cd62131

add else statement

Oct 19th, 2013
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.24 KB | None | 0 0
  1.   private void turn(int i) {
  2.     if (this.swiches[i] == 0) {
  3.       this.swiches[i] = 1;
  4.     }
  5.     else {
  6.       this.swiches[i] = 0;
  7.     }
  8.     if (this.lamp == 0) {
  9.       this.lamp = 1;
  10.     }
  11.     else {
  12.       this.lamp = 0;
  13.     }
  14.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement