OOP_1

OOP_1

University

10 Qs

quiz-placeholder

Similar activities

Conceptos C++

Conceptos C++

University

10 Qs

Go Quiz

Go Quiz

University

15 Qs

Preguntas sobre Punteros en C/C++

Preguntas sobre Punteros en C/C++

University

14 Qs

TECH WHIZ

TECH WHIZ

University

15 Qs

UNIT-I Water Supply

UNIT-I Water Supply

University

10 Qs

Pseudocodigo y PSeInt

Pseudocodigo y PSeInt

University

10 Qs

Oops moment/1

Oops moment/1

University

13 Qs

BugBlitz

BugBlitz

University

15 Qs

OOP_1

OOP_1

Assessment

Quiz

Engineering

University

Medium

Created by

Arti Sonawane

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will str1==str2 return if both refer to the same string literal?

true

false

compilation error

0

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a constructor?

To destroy objects

to call methods

to initialise object

to inherit classes

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is an incorrect array declaration?

int arr[] = new int[5]

int [] arr = new int[5]

int arr[] = new int[5]

int arr[] = int [5] new

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which access modifier makes a member accessible within the same package?

public

private

protected

default(no modifier)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the static keyword mean in a method declaration?

The method belongs to an object

The method can only be called once

The method belongs to the class, not instances

The method cannot be accessed

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is constructor overloading?

Having multiple constructors with different names

Having multiple constructors with different return types

Having multiple constructors with different parameters

Having a constructor inside a method

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these method of String class can be used to test to strings for equality?

isequal()

isequals()

equal()

equals()

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?