Guest User

Untitled

a guest
Dec 10th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public class Program2
  2. {
  3. public void redundantLogic(int x)
  4. {
  5. if (x % 2 == 0);
  6. {
  7. System.out.println("Even!");
  8. }
  9. else if (x % 4 == 0)
  10. {
  11. System.out.println("Multiple of 4!");
  12. }
  13. else if (x % 2 == 1 && x % 3 == 1)
  14. {
  15. System.out.println("x is odd, and is one more than a multiple of three.");
  16. }
  17. }
  18.  
  19. }
Add Comment
Please, Sign In to add comment