Object Oriented Programming MCQs

Page No. 31

In how many ways can an object be passed to a function?


a1


b 2


c3


d4


View Answer 3

Can reference to an object be returned from a method?


aYes, always possible


bYes, but not always


c No, never possible


dNo, Not possible because referred element would be destroyed


View Answer Yes, but not always

Invoking a method on a particular object is ____________ sending a message to that object.


aDifferent from


bSame as


cSomewhat similar


dPart of


View Answer Same as

Java handles memory dynamically and references are deleted as soon as they are out of scope.


aTrue


bFalse


cA & B


dNone of these


View Answer True

How many objects can be referenced from the same variables?


a One at a time


bMany at a time


cMany using array name


d7 at max at same time


View Answer One at a time

How to refer to method of nested class?


aenclosingClassObject.innerClassObject.method();


b innerClassObject.method();


cmethod();


depends on where the method is being called


View Answer method();

Which of the members are referred by this pointer usually (Java)?


aMembers of class where this is used


bMember of the parent class where this is used


cMembers that are passed as argument to the object


d Pointers are not applicable in java



If a reference variable is declared final then _________________


aIt can never be reassigned to refer to a different object


bIt can be assigned to refer to any object anytime


cIt can never be assigned with any object


dIt can be assigned with 2 or more objects simultaneously



Can a super class object give reference to a subclass method?


aNo, it is not possible


bMaybe, it is possible


cNo, it’s not possible


dNo, It’s not possible in few cases only



Is there any explicit use of pointers in java that would be applicable to objects?


aYes, we use reference for this purpose


bYes, we use java arrays for this purpose


cNo, implicit pointing is possible


dNo, direct class names should be used



Goto Page No.

Page 31 of 93

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan