
Java Basics 2

Quiz
•
Computers
•
9th Grade - University
•
Hard

Tim Jones
Used 5+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following method declaration, what is the name of the method?
public static void showMenu(String category) {}
public
static
void
showMenu
String
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following method declaration header, how many formal parameters are there?
public static double squareRoot(double value)
0
1
2
None. Methods do not have formal parameters
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What word is missing below (fill in the __________). The method called increaseTemperature takes 2 integers as formal parameters. The two parameters represent the upper and lower targets. The method returns the difference between the upper and lower targets as an integer.
public static _________ increaseTemperature(int upper, int lower) { return upper - lower;}
void
double
int
return
Nothing. No word is needed in the blank space.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this main() method?
public static void main(String [] args) {
System.out.print("A");
processRequest();
System.out.print("B"); System.out.print("C");
showMenu();
System.out.print("D");}
public static void showMenu() { System.out.print("Q");}
public static void eraseFile() { System.out.print("T");}
public static void processRequest() { System.out.print("2");}
ABCDQT2
A2BDCTQ
A2BCQD
A2CBQD
A2BCQTD
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code in the main is valid:
public static void main(String [] args) {
int value; value = createGameCharacter();
// rest of program}
public static void createGameCharacter() { // code}
true
false
Impossible to determine
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code in the main is valid:
public static void main(String [] args) {
int value; value = depositMoney(amount); // rest of program}
public static int depositMoney() { return 4;}
true
false
Impossible to determine
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this main() method?
public static void main(String [] args) {
int value; loadSong(5);
value =checkLength(1);
System.out.print(value);
public static void loadSong(int id) { System.out.print(id);}
public static int checkLength(int id) { System.out.print(id); id = id + 4; System.out.print(id); return 9;}
5199
5559
5159
519
5
Create a free account and access millions of resources
Similar Resources on Wayground
17 questions
AP CS Test 0 Module 1

Quiz
•
9th - 12th Grade
12 questions
Operators in C

Quiz
•
University
15 questions
Java

Quiz
•
University
20 questions
Java, part I

Quiz
•
11th Grade - University
14 questions
Lets explore Java

Quiz
•
University
15 questions
Basic Java Quiz

Quiz
•
University
16 questions
Java_10-a-30

Quiz
•
8th - 12th Grade
12 questions
AppsLab_Q3

Quiz
•
1st Grade - Professio...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

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

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade