
Java Basics 2
Authored by Tim Jones
Computers
9th Grade - University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
15 questions
Excel
Quiz
•
12th Grade
20 questions
BÀI 24-25 TIN 10
Quiz
•
10th Grade
18 questions
Lenguaje de Definición de Datos
Quiz
•
University
20 questions
CSS Acronyms
Quiz
•
9th - 10th Grade
10 questions
İç Donanım Birimleri - Anakartlar-2
Quiz
•
10th Grade
10 questions
Programacion Orientada a Objetos
Quiz
•
12th Grade - University
20 questions
Unit Test 1 Class 8 Computer
Quiz
•
8th - 9th Grade
20 questions
Software
Quiz
•
10th Grade
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade