Arush22

Untitled

Dec 11th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. 6. a class method
  2. 7. It is a class method
  3. 8. Quiz.foo();
  4. 13. Math.E ;
  5. 17. 5
  6. 18. 2.0
  7. 19. 3.141592653589793
  8. 20. 6.0
  9. 21. 4
  10. 22. 8
  11. 23. 8.0
  12. 28. System.out.print("Welcome ");
  13. System.out.print("to ");
  14. System.out.print("Java ");
  15. System.out.print("Illuminated ");
  16. 29. int max;
  17. int max = Math.max(3,5);
  18. System.out.print(max);
  19. 30. double d = 5.0;
  20. System.out.print(Math.sqrt(d));
  21. 31. System.out.print("Integer One: ");
  22. int firstInteger = scan.next();
  23. System.out.print("Integer Two: );
  24. int secondInteger = scan.next();
  25. System.out.print(Math.min(firstInteger,secondInteger));
  26. 32. System.out.print("Integer One: ");
  27. int firstInteger = scan.next();
  28. System.out.print("Integer Two: );
  29. int secondInteger = scan.next();
  30. System.out.print("Integer Three: );
  31. int thirdInteger = scan.next();
  32. System.out.print(Math.max(firstInteger,secondInteger,thirdinteger));
  33. 34. System.out.print("Decimal Number: ");
  34. double decimal = scan.next();
  35. System.out.print(Math.pow(decimal,1/2));
  36. 40. Math.round returns values in decimal format and short can't take decimal format.
  37. 41. Math.pow returns values in decimal format and int can't take decimal format.
  38. 42. Since PI is a method it should be Math.PI; not Math( PI );.
  39. 46. The M in math must be capitalized. Capitalize the M in math.
  40. 47. There should be no parenthesis following PI because PI is a fixed value with no parameters. Get rid of the parenthesis after Math.PI;.
  41. 48. The E in Math.E; should be capitalized. Capitalize the E in Math.E;.
  42. 53. double firstNumber = Math.random;
  43. double secondNumber = Math.random;
  44. System.out.print(Math.min(firstNumber,secondNumber));
  45. 54. System.out.print("Decimal Number: ");
  46. double decimalNumber = scan.next();
  47. System.out.print(Math.pow(decimalNumber,3));
Add Comment
Please, Sign In to add comment