Arush22

Untitled

Jan 12th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. 1. True, True, False, false, True, True, True
  2. 2. False, True, False, True, False, True, False, False
  3. 3. Yes
  4. 4. Yes
  5. 5. Yes
  6. 6. Yes
  7. 7. Yes, Yes, Yes, No
  8. 8. if, else if, else
  9. 9. Using the equals method
  10. 10. 1
  11. 11. Error
  12. 12. Inside true block
  13. End of sequence
  14. 13. 27 is divisible by 3
  15. 14. String is not hello
  16. End of sequence
  17. 15. C
  18. Done
  19. 16. Hello 3
  20. Hello 4
  21. Done
  22. 17. Season is Summer
  23. 18. letter 2
  24. 19. Number 3
  25. 31. b1 is a Boolean and can't be set to an integer value. && is not a number operator.
  26. 32. AND should be written as &&.
  27. 33. Curly brackets should replace the semicolon after the if statement and should encapsulate the System.out.print code that will be performed.
  28. 34. Parenthesis should surround b1 after the if statement and curly brackets should surround the operation to be performed.
  29. 35. Parenthesis, not curly brackets, should surround b2 after the if statement.
  30. 36. else should come after else if otherwise else if won't be performed.
  31. 37. Because the if compares two values and the else if compares a different two values it is possible for both to be true but the else if will never execute even if its true, if the if statement is true.
  32. 38. Because the if tests a value and the else if compares a different two values it is possible for both to be true but the else if will never execute even if its true, if the if statement is true.
  33. 39. It can't read the if statement because there are not brackets surrounding the code to be performed. Put brackets around the operation to be formed after the if statement.
  34. 40. The value of a is being set to 31 rather than being compared to it. Replace "=" with "==";
  35. 41. The bracket that encloses the code to be performed after the if statement extends past the else statement which means that the compiler doesn't know where to stop executing the code for the if statement so it can't read it. Place a closing curly bracket before the else statement and an opening curly bracket immediately after the else statement.
Add Comment
Please, Sign In to add comment