
unit 3 practice question set 8
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Caleb Kim
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
int x =2;
int y =3;
System.out.println(x + " + "+ y + " = " +adder(y,x));
}
public static int adder(int x, int y)
{
return x+y;
}
}
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
int x =2;
int y =3;
int answer = subtracter(x,y);
System.out.println(x + " - "+ y + " = " +answer);
}
public static int subtracter(int x, int y)
{
return x-y;
}
}
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
int x =2;
int y =3;
int answer = subtracter(y,x);
System.out.println(x + " - "+ y + " = " +answer);
}
public static int subtracter(int x, int y)
{
return x-y;
}
}
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
int x = 5;
int y = 2;
System.out.println(mystery(x,y));
}
public static int mystery(int x, int y)
{
return x+y;
}
public static double mystery(double x, double y)
{
return x-y;
}
public static double mystery(double x, int y)
{
return x/y;
}
public static int mystery(int a)
{
return (int)(Math.pow(a,2));
}
}
3.5
2.5
7
error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
int x = 5;
int y = 2;
System.out.println(mystery(x));
}
public static int mystery(int x, int y)
{
return x+y;
}
public static double mystery(double x, double y)
{
return x-y;
}
public static double mystery(double x, int y)
{
return x/y;
}
public static int mystery(int a)
{
return (int)(Math.pow(a,2));
}
}
error
25
3.5
7
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
double x = 5;
double y = 2;
System.out.println(mystery(x, y));
}
public static int mystery(int x, int y)
{
return x+y;
}
public static double mystery(double x, double y)
{
return x-y;
}
public static double mystery(double x, int y)
{
return x/y;
}
public static int mystery(int a)
{
return (int)(Math.pow(a,2));
}
}
error
7
2.5
3.0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the below code?
public class TestClass
{
public static void main(String[] args)
{
double x = 5;
int y = 2;
System.out.println(mystery(x,y));
}
public static int mystery(int x, int y)
{
return x+y;
}
public static double mystery(double x, double y)
{
return x-y;
}
public static double mystery(double x, int y)
{
return x/y;
}
public static int mystery(int a)
{
return (int)(Math.pow(a,2));
}
}
error
2.5
3.0
25
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
INTRODUCCION A LA PROGRAMACION
Quiz
•
6th Grade - University
12 questions
Tecnología de la Telecomunicación
Quiz
•
11th Grade
15 questions
REVIEW WEB SERVER ASJ XI TKJ
Quiz
•
11th Grade
10 questions
SHORTCUT PADA KEYBOARD
Quiz
•
10th - 12th Grade
10 questions
Binary Subtraction
Quiz
•
12th Grade
10 questions
Control y Robótica
Quiz
•
12th Grade
10 questions
Fundamentos PHP (Manejo de Fomularios y arreglos)
Quiz
•
9th Grade
10 questions
Explorando Tinkercad en Secundaria
Quiz
•
7th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
