Advertisement
Arush22

Untitled

Nov 28th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. 1. int a;
  2. 2. int,char
  3. 4. 12.5
  4. 5. 6
  5. 6. 13 or error
  6. 23. float a = 34.2;
  7. 24. a = 10;
  8. 25. boolean a = false;
  9. 26. int total = a+b+c;
  10. System.out.println( total );
  11. 33. 3.3 isn't an integer.
  12. 34. 45.2 is too large for float.
  13. 38. There is no error because char can accept both numbers and letters.
  14. 39. There is no error because 1 represents true.
  15. 40. 26.4 is not an integer. You have to change the keycode to float.
  16. 41. There is no semicolon at the end. Add a semicolon at the end.
  17. 46. System.out.println("****");
  18. 52. This kind of coding makes it easier to locate where the problem is when you compiler is unable to run the code properly due to some sort of problem in the code.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement