
Quiz#2
Authored by M R
Computers
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Given the following class declaration:
class Table {
int legs;
String color;
}
Which of the following choices represent the memory after creating an object of Table using the following statement:
Table tab1 = new Table( );
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Read the following Java code:
public class Test {
public static void main (String [] args){
Plane p1 = new Plane( );
................................... // This is the blank
} }
class Plane {
String name;
double engine;}
Which of the following statements is correct to be written in the blank?
p1.engine = "Air";
p1. name = "Jet";
name = "Jet";
Plane.name="Jet";
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Read the following Java code:
public class Test {
public static void main (String [] args){
Plane p1 = new Plane( );
................................... // This is the blank
} }
class Plane {
String name;
double engine;
void run( )
{System.out.println(name);}
}
Which of the following statements is correct to be written in the blank to call the run method?
p1.run( );
System.out.println(p1.run( ));
double d = p1.run( );
p1.run("Jet",3.1);
run( );
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Read the following Java code:
public class Test {
public static void main (String [] args){
Plane p1 = new Plane( );
................................... // This is the blank
} }
class Plane {
private String name;
public double engine;
}
Which of the following statements is correct to be written in the blank?
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Read the following Java code:
public class Test {
public static void main (String [] args){
Plane p1 = new Plane( );
p1.help( );
} }
class Plane {
private String name;
public double engine;
double help( )
{return engine + 5.1; }
}
What is the output after executing the code above?
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
10 questions
Pre-Test การตรวจสอบความน่าเชื่อถือของข้อมูล
Quiz
•
9th Grade - University
9 questions
Orientação a objetos básica
Quiz
•
University
10 questions
Topic 1 - Type of Software
Quiz
•
University
10 questions
Session 2
Quiz
•
University
10 questions
T_4.2 Identifier, Data Types, Operators & Expressions
Quiz
•
12th Grade - University
10 questions
IoT Cloud
Quiz
•
University
10 questions
Q3 G9/10 Quiz on Site Development Plan M8
Quiz
•
9th Grade - University
10 questions
Marketing Digital
Quiz
•
University
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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