Java_Foundation_3

Java_Foundation_3

Professional Development

10 Qs

quiz-placeholder

Similar activities

Technical Formulas in LaTeX

Technical Formulas in LaTeX

Professional Development

9 Qs

Computación básica - Conceptos básicos

Computación básica - Conceptos básicos

Professional Development

15 Qs

Classes and Object, this

Classes and Object, this

Professional Development

15 Qs

Dart Funciones y Clases

Dart Funciones y Clases

Professional Development

10 Qs

Dragon maina legends

Dragon maina legends

Professional Development

12 Qs

Java Programming Quiz #1

Java Programming Quiz #1

Professional Development

10 Qs

IOT Introduction Quiz

IOT Introduction Quiz

Professional Development

10 Qs

Java OOP

Java OOP

Professional Development

10 Qs

Java_Foundation_3

Java_Foundation_3

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Rukumani CT_PG

Used 8+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the result

The compilation fails at line 9

The compilation fails at line 2

Hello World

The compilation fails at line 8

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

Which two allow a.Main to allocate a new Person? (Choose two.)

In Line 1, change the access modifier to privateprivate Person() {

In Line 1, change the access modifier to publicpublic Person() {

In Line 2, add extends Person to the Main classpublic class Main extends Person {and change Line 3 to create a new Main objectPerson person = new Main();

In Line 2, change the access modifier to protectedprotected class Main {

In Line 1, remove the access modifierPerson() {

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which interface in the java.util.function package will return a void return type?

Supplier

Predicate

Function

Consumer

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

Which two lines inserted in line 1 will allow this code to compile? (Choose two.)

protected void walk(){}

void walk(){}

abstract void walk();

private void walk(){}

public abstract void walk();

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the result?

An exception is thrown at runtime

42=(x+y)=42

42=(x+y)=6

6=(x+y)=42

6=(x+y)=6

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

Which three actions implement Java SE security guidelines? (Choose three.)

Change line 7 to return names.clone();

Change line 2 to protected volatile String[] names;

Change line 2 to private final String[] names;

Change line 3 to private Secret(String[] names) {

Change the getNames() method name to get$Names()

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which is the correct order of possible statements in the structure of a Java class file?

class, package, import

package, import, class

import, package, class

package, class, import

import, class, package

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?