Swap Exercise

 

  firstCup

  secondCup

  System.out.println(“the game begins...");
  System.out.println(“The value of firstCup is “ + firstCup);
  System.out.println(“The value of secondCup is “ + secondCup);
  System.out.println(“Swap now"); 

 (Figure out how to swap the values)

  System.out.println(“The value of firstCup is  now “ + firstCup);

  System.out.println(“The value of secondCup is now“ + secondCup);

Now, Run your program and see the values switch.

Then, change the value of firstCup to 8 and secondCup  to 7 and recompile

Run your program again and see it print out 7 for the first and 8 for the second.