
Exercise 1 OOP

Quiz
•
Computers
•
University
•
Hard
azlina ibrahim
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Define (System.in ) in Java code
Wraps another Reader and improves performance.
The flow of data to a program from an input device
The flow of data from a program to an output device
Provides a readLine method to read a line of text.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the following program output
class question4{ public static void main ( String[] args )
{ int totalCost = 6;
int items = 12;
System.out.println("cost per item: " + totalCost/items );
}}
cost per item: 2
cost per item: 0
cost per item: 0.5
cost per item: +6/12
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose a code to declare an array and initialize it with five numbers
int a [] = new int(5);
int [5] array;
int [] a = (23,22,21,20,19);
int [] a = {23,22,21,20,19};
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Determine the output for the following code segment
int count=1;
while(count<=3)
{ system.out.print(count+” ”);
count++; }
1 2 3
1
2
3
111
3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following code fragment
int sum = 14;
if ( sum < 20 )
System.out.print("Under ");
else
System.out.print("Over ");
System.out.println("the limit.");
Under
the
limit
Over
the
limit
Under the limit
Over the limit
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Construct the syntax to create an object from a class named Student.
Student poli = void Student ();
Student poli = new Poli ();
Student poli = new Student ();
Student poli = Student Poli;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Classify which statement that refers to constructor characteristic
Cannot be the same name as class name.
Must start with void keyword.
Must have a return value.
Special kind of method.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
C Basics

Quiz
•
University
14 questions
Java Operators

Quiz
•
University
11 questions
Array

Quiz
•
University
10 questions
Talent Next Java MCQ-1

Quiz
•
University
10 questions
java quiz on Encapsulation and Abstraction

Quiz
•
University
10 questions
Temel Java Bilgisi Ölçme Testi

Quiz
•
University
7 questions
Java Programming Game

Quiz
•
University
13 questions
Intro to IF statements

Quiz
•
KG - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University