OOP ppp

OOP ppp

University

24 Qs

quiz-placeholder

Similar activities

2F-3 | Python Quiz | 22/11/2024

2F-3 | Python Quiz | 22/11/2024

University

20 Qs

2F-1 | Python Quiz | 14/10/2024

2F-1 | Python Quiz | 14/10/2024

University

20 Qs

Unit-8 (QB64) Year-6

Unit-8 (QB64) Year-6

6th Grade - University

22 Qs

C Programming Workshop Quiz

C Programming Workshop Quiz

University

20 Qs

120-140

120-140

University

20 Qs

G9-Introduction to Python Programming

G9-Introduction to Python Programming

9th Grade - University

25 Qs

Java Exception Handling Quiz

Java Exception Handling Quiz

University

20 Qs

Fundamentals of programming Quiz

Fundamentals of programming Quiz

University

25 Qs

OOP ppp

OOP ppp

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Aditya Djalil

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

If we invoke the static method showTest(), what will the output be?

none, the class will not compile

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the variable code equal after the method convertCode() is run?

The code will not compile

100237

237

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An object is an instantiation of a class. Pernyataan ini dapat diterjemahkan sebagai -sebuah obyek adalah sebuah perwujudan dari sebuah kelas.

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output?

The code will compile but have runtime error

The code will not compile because the Student class located in package model could not be accessed from any class outside its package

The code will not compile because the Main class should not have public modifier

The code will compile and run fine

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of this class will be when compile and run?

Output is 2

The file will not compile because we can’t directly access method increment inside the static method (the object should be instantiated first then use the object to access increment method)

The file will compile, but will give an error when run

Output is 1

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What code should be put to print the length of the second element of the first dimension of the array named arr, which is { 4, 5 }?

System.out.println(test.arr[0].length);

 System.out.println(test.arr.length);

System.out.println(test.arr[1].length);

System.out.println(test.arr[1].length());

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 It will compile and output 21 to the screen

It will compile, but will produce interpreter error when executed

It will not compile and give the compile error

It will compile and output 20 to the screen

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?