Exercise 1 OOP

Exercise 1 OOP

University

10 Qs

quiz-placeholder

Similar activities

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

Website Usability and UX

Website Usability and UX

University

10 Qs

2024 - Struktur Data Quiz 1

2024 - Struktur Data Quiz 1

University

10 Qs

Python Week 1 & 2

Python Week 1 & 2

University

10 Qs

OM_SBENT3C_Q2

OM_SBENT3C_Q2

University - Professional Development

15 Qs

Hands-on Modul 3

Hands-on Modul 3

University

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

CS100||MsWord

CS100||MsWord

University

10 Qs

Exercise 1 OOP

Exercise 1 OOP

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

azlina ibrahim

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?