
unit 3 practice question set 8

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Caleb Kim
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
LATIHAN 4

Quiz
•
10th Grade
10 questions
Программирование C#

Quiz
•
1st - 10th Grade
12 questions
Loops

Quiz
•
9th - 12th Grade
8 questions
Algorithms / Methods

Quiz
•
9th Grade
12 questions
4B_java_Novembre2021

Quiz
•
11th Grade
11 questions
#124 Unit 2 Lesson 6 Variables

Quiz
•
11th Grade
12 questions
OOP Pengenalan

Quiz
•
11th Grade
11 questions
Python Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade