No student devices needed. Know more
13 questions
Which line of code would set x = to a number between 50 and 100?
int x = (int) (Math.random()*50)+50;
int x = (int) (Math.random()*50)-50;
int x = (int) (Math.random()*50)+51;
int x = (int) (Math.random()*50)+49;
What is printed when the code is run?
Frankvelt
ranklivelt
Franko
lino
What will print when this code is run?
7
9.0
5.66
5.0
What will s equal? int s = Math.abs(13-21);
8
-8
8.0
-8.0
Which would be a valid call to this code?
PT(21.0, 8);
PT(7,"4");
PT(2,4);
PT(1.0,1.0);
What will l = after the code is run?
5
6
7
8
What will p = after the code is run? String p = "cat " + 9;
cat
Nothing will print
The code will not compile
cat 9
What will print?
58cat
5 8 cat
13 cat
13cat
True or False - The scope of parameters is the method in which they are defined.
True
False
True or false - Overloaded methods must have the same parameters with different names.
True
False
What is printed when this code is run?
What will be printed when funMethod(10,20); is run?
20
15
10
25
How many $ print when funMethod(10,20); is called?
4
5
6
7
Explore all questions with a free account