Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 6. instance method
- 7. variable
- 8. Quiz.foo();
- 13. Math.E;
- 17. 5
- 18. 2.0
- 19. 3.141592653589793
- 20. 6
- 21. 4.0
- 22. 8
- 23. 8
- 28.
- System.out.print("Welcome ");
- System.out.print("to ");
- System.out.print("Java ");
- System.out.print("Illuminated");
- 29. i = Math.min(3, 5);
- System.out.print(i);
- 30. d = Math.sqrt(d);
- System.out.print(d);
- 31. Scanner read = new Scanner(System.in);
- System.out.println("Enter first number");
- int one = read.nextInt();
- System.out.println("Enter second number");
- int two = read.nextInt();
- int min = Math.min(one, two);
- System.out.println(min);
- 34. Scanner read = new Scanner(System.in);
- System.out.println("Enter double ");
- double d = read.nextDouble();
- double sq = Math.pow(d, d);
- System.out.print("The square of your number is" + sq);
- 40. not short but long
- 41. not int but double
- 42. Math.PI;
- 46. didn't input double. change to 6.0
- 47. no () needed
- 48. need to be Math.E;
- 53. import java.util.Random;
- public class sp144q53
- {
- public static void main(String [] args)
- {
- Random r = new Random();
- int start = 0, end = 100;
- int one = r.nextInt(end - start + 1) + start;
- int two = r.nextInt(end - start + 1) + start;
- int min = Math.min(one, two);
- System.out.println(min);
- }
- }
- 54. import java.util.Scanner;
- public class sp144q54
- {
- public static void main(String [] args)
- {
- Scanner input = new Scanner(System.in);
- System.out.print("Enter a double ");
- double i = input.nextDouble();
- double i3 = i * i * i;
- System.out.println(i3);
- }
- }
Add Comment
Please, Sign In to add comment