
Quiz 3
Authored by Kyle Yap
World Languages
1st - 5th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
19 questions
ELECTRICITY
Quiz
•
5th Grade
20 questions
QUIZ ENGLISH 9
Quiz
•
1st Grade - Professio...
14 questions
Sign 2
Quiz
•
4th - 6th Grade
16 questions
"Near" - Près du - Près de la - Près des - Près de l'
Quiz
•
4th Grade
14 questions
J5B Unit 7 Reading
Quiz
•
4th - 5th Grade
20 questions
Les lieux dans une ville
Quiz
•
5th - 7th Grade
20 questions
Drone Class - Week 1 Review
Quiz
•
1st - 5th Grade
20 questions
IT Computer Science Chapter 2 Quiz
Quiz
•
5th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for World Languages
10 questions
Comparative and Superlative Adjectives
Quiz
•
3rd Grade
15 questions
Identify Adjectives Quiz
Quiz
•
5th Grade
12 questions
Los Medios de Transporte
Quiz
•
3rd Grade
10 questions
Lunar New Year Quiz
Quiz
•
2nd Grade
12 questions
Figuras 2D y 3D y medidas
Quiz
•
KG - 2nd Grade
11 questions
Los quehaceres
Quiz
•
3rd Grade
20 questions
les vetements et les couleurs
Quiz
•
5th - 12th Grade
8 questions
Ser Vs estar
Lesson
•
3rd - 5th Grade