
Quiz 3
Quiz
•
World Languages
•
1st - 5th Grade
•
Practice Problem
•
Medium
Kyle Yap
Used 2+ times
FREE Resource
Enhance your content in a minute
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_01. What is the output of the following program? Be precise about where there are spaces and where there are newlines.
public class Ex4_1{
public static void zoop() {
baffle();
System.out.print("you foo ");
baffle(); }
public static void main(String[] args) {
System.out.print("No, I ");
zoop();
System.out.print("I ");
baffle(); }
public static void baffle() {
System.out.print("baz");
ping(); }
public static void ping() {
System.out.println("."); } }
the program doesn't stop
No, I baz.
you foo baz.
I baz.
none of the other choices is correct
you foo baz.
No, I baz.
I baz.
you foo baz.
No, I baz.
I baz.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_02. What is the output of the following program?
public class Ex4_2{
public static void zoop() {
baffle();
System.out.print("you foo ");
baffle(); }
public static void main(String[] args) {
System.out.print("No, I ");
zoop();
System.out.print("I ");
baffle(); }
public static void baffle() {
System.out.print("baz");
ping(); }
public static void ping() {
System.out.println(".");
baffle(); } }
you foo baz.
No, I baz.
I baz.
none of the other choices is correct
the program doesn't stop
No, I baz.
you foo baz.
I baz.
you foo baz.
No, I baz.
I baz.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_03. Choose what would be the correct first line of a method named zool that takes three parameters: an int and two Strings.
none of the other choices is correct
public void zool(int i, String s1, String s2)
public void zool(int i, String s1, s2)
public zool(int i , String ss, String ss)
public void zool(int, Str, Str)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_04. Identify the line of code that calls a method named zool, that takes three parameters: an int and two Strings, passing as arguments the value 11, the String "hello" and the String "world".
public void zool(11,"hello","world")
zool(11, hello, world)
zool(int, Str, Str)
none of the other choices is correct
zool(11,"hello", "world")
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_06. Suppose you have a static method called printAmerican that takes the month (e.g. "July"), day (e.g. 23), year (e.g. 2018), and day of the week (e.g. "Thursday") as parameters and displays them in American format (e.g. Thursday, July 23, 2018). Which one of the following programs calls the method correctly to print the date.
public class PrintAmerican{
//method diefition goes here
public static void main(String[] aaa){
PrintAmerican("July", 23, 2018, "Thursday");
}
}
PrintAmerican.PrintAmerican("July", 23, 2018, "Thursday");
public class PrintAmerican{
//method definition goes here
public static void main(String[] aaa){
main.PrintAmerican("July", 23, 2018, "Thursday");
}
}
none of the other choices is correct
public class PrintAmerican{
//method definition goes here
public static void foo(String[] aaa){
PrintAmerican("July", 23, 2018, "Thursday");
}
}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_07. in the following code the print statements are numbered (the numbers look like //1, //2, //3, //4)
list the numbers in the order in which they are executed.
public class foo{
public static void main(String[] args) {
zippo("foo");
System.out.println("foo");//1
baffle("zoo");
}
public static void baffle(String blimp) {
System.out.println(blimp);//2
}
public static void zippo(String quince) {
System.out.println(quince);//3
System.out.println(quince);//4
}
}
3142
none of the other answers is correct
3412
1324
3124
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
TJ04_08. in order to use the Math class you must first import the package that contains it.
True
False
Create a free account and access millions of resources
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
Articles - Definite / zero
Quiz
•
4th - 9th Grade
21 questions
Country or City Living
Quiz
•
4th Grade
20 questions
la publicité /b2
Quiz
•
1st - 12th Grade
20 questions
SCIENCE 4º. UNIT 5. FORCES AND MACHINES
Quiz
•
4th Grade
18 questions
MANDARIN P5 LESSON 16
Quiz
•
5th Grade
15 questions
Arabic Shadows Academy (question words )
Quiz
•
1st - 2nd Grade
17 questions
Star Reading Renaissance Practice Test
Quiz
•
1st - 5th Grade
17 questions
Stage 11 Culture
Quiz
•
KG - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for World Languages
15 questions
Government review
Quiz
•
1st - 5th Grade
20 questions
Telling Time in Spanish
Quiz
•
3rd - 10th Grade
10 questions
Christmas Around the World
Lesson
•
2nd Grade
26 questions
Santillana U3 D4 Las compras
Quiz
•
1st - 12th Grade
25 questions
Gustar Practice
Quiz
•
KG - University
20 questions
Asi Se Dice Capitulo 1 Gramatica
Quiz
•
5th - 8th Grade
16 questions
Los utiles escolares
Quiz
•
5th - 7th Grade
10 questions
Singular and Plural Nouns Quiz
Quiz
•
2nd Grade
