MCQ 1511 MarkWhat will be given as referring instance variable or invoking method with null reference?✓ An errorB Status codeC Object codeD None of theseAnswerCorrect option: A. An errorAn errorView full question & answer→
MCQ 1521 MarkWhich of the following cannot be used legally?A Null referenceB Null pointer✓ a Or bD None of theseAnswerCorrect option: C. a Or ba Or bView full question & answer→
MCQ 1531 MarkWhat is the default initial value of reference variable which does not refer to any object?✓nullB0C/0D—1AnswerCorrect option: A. nullnullView full question & answer→
MCQ 1541 MarkWhich operator is not needed to use when the instance variables are referred within the methods of the same class?✓ .B ;C newD ,AnswerCorrect option: A. ..View full question & answer→
MCQ 1551 MarkWhat is the associativity of dot operator?A Right to Left✓ Left to RightC Middle to LeftD Any of the sidesAnswerCorrect option: B. Left to RightLeft to RightView full question & answer→
MCQ 1561 MarkFrom where and to which end does the associativity of dot operator move to?A Right to Left✓ Left to RightC Middle to LeftD Any of the sidesAnswerCorrect option: B. Left to RightLeft to RightView full question & answer→
MCQ 1571 MarkHow can we invoke display () method of Room r1?✓r1. display 0Br1. display 1Cr1; display 0D_displayAnswerCorrect option: A. r1. display 0r1. display 0View full question & answer→
MCQ 1581 MarkHow can we refer to length of Room r1 in a program?A length. R1✓ r1. lengthC r1; lengthD _lengthAnswerCorrect option: B. r1. lengthr1. lengthView full question & answer→
MCQ 1591 MarkBy which of the following operator are instance variables and instance methods accessed?A .B newC ;✓ (Dot Operator)AnswerCorrect option: D. (Dot Operator)(Dot Operator)View full question & answer→
MCQ 1601 MarkBy which of the following are Instance variables and Instance methods accessed?✓ ClassB ObjectC a and b bothD None of theseAnswerCorrect option: A. ClassClassView full question & answer→
MCQ 1611 MarkWhich of the following has its own set of data?✓ Each object instanceB Objects according to the classC Object according to the methodD None of theseAnswerCorrect option: A. Each object instanceEach object instanceView full question & answer→
MCQ 1621 MarkWhich of the following is an allocated memory in data structure called heap?✓ All instances of classB All methods of classC a and b bothD None of theseAnswerCorrect option: A. All instances of classAll instances of classView full question & answer→
MCQ 1631 MarkWhich of the following is done by ‘new’ keyword?A Objects are created.B It returns a reference to an object that represents an instance of the class.✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 1641 MarkWhich instance method has been defined in a class named Room in the textbook?A setAttr0B display 0C area✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 1651 MarkWhich instance variables have been defined in a class named Room in the textbook?A lengthB width, heightC Windows✓ All of theseAnswerCorrect option: D. All of theseAll of theseView full question & answer→
MCQ 1661 MarkWhat is known as to ask the object to perform some task in Java?✓ Invoking a methodB Removing a methodC Declaring a methodD Hiding a methodAnswerCorrect option: A. Invoking a methodInvoking a methodView full question & answer→
MCQ 1671 MarkWhich is the method that can be invoked using the objects to access or modify the instance variable?✓ Instance methodB Subsidiary methodC Main methodD Index methodAnswerCorrect option: A. Instance methodInstance methodView full question & answer→
MCQ 1681 MarkBy using which of the following ‘methods’ can be invoked?✓ ObjectsB ClassC FunctionD ScriptAnswerCorrect option: A. ObjectsObjectsView full question & answer→
MCQ 1691 MarkWhere can methods be defined in Java?A In subclass✓ Inside a classC Outside of the classD Is not possibleAnswerCorrect option: B. Inside a classInside a classView full question & answer→
MCQ 1701 MarkWhich of the following stores its own value for the attributes?✓ InstanceB ClassC FunctionD OperatorAnswerCorrect option: A. InstanceInstanceView full question & answer→
MCQ 1711 MarkWhat does the class define?✓ kind of attributesB Name of attributesC a and b bothD None of theseAnswerCorrect option: A. kind of attributeskind of attributesView full question & answer→
MCQ 1721 MarkWhat do instance variables define?A Class of an object✓ Attributes of an objectC Method of an objectD Operator of an objectAnswerCorrect option: B. Attributes of an objectAttributes of an objectView full question & answer→
MCQ 1731 MarkWhich variables stay throughout the life of the object?✓ Instance variableB Class variableC Object variableD Garbage variableAnswerCorrect option: A. Instance variableInstance variableView full question & answer→
MCQ 1741 MarkWhich variables are created at the time of creating an object?A Class variable✓ Instance variableC Object variableD Garbage variableAnswerCorrect option: B. Instance variableInstance variableView full question & answer→
MCQ 1751 MarkEach instance of a class can hold different values for its attributes in variables declared in a class What such variables are referred as?✓ Instance variableB Class variableC Object variableD Garbage variableAnswerCorrect option: A. Instance variableInstance variableView full question & answer→
MCQ 1761 MarkWhich type of values can each instance of a class hold?✓ DifferentB SameC More than oneD More than twoAnswerCorrect option: A. DifferentDifferentView full question & answer→
MCQ 1771 MarkWhich type of values can each instance of a class hold for its attributes in the variable declared in a class?✓ DifferentB SameC More than oneD More than twoAnswerCorrect option: A. DifferentDifferentView full question & answer→
MCQ 1781 MarkWhich terms are often interchangeably used in OOP language?✓ Instance and ObjectB Object and ClassC Class and MethodD Instance and MethodAnswerCorrect option: A. Instance and ObjectInstance and ObjectView full question & answer→
MCQ 1791 MarkWhich of the following is a concrete representation of an object?✓ InstanceB ClassC MethodD FunctionAnswerCorrect option: A. InstanceInstanceView full question & answer→
MCQ 1801 MarkWhich of the following is an abstract representation of an object?✓ ClassB InstanceC MethodD FunctionAnswerCorrect option: A. ClassClassView full question & answer→
MCQ 1811 MarkFor what does an actual instance of a class stands as another word?✓ an actual objectB MethodC FunctionD OperatorAnswerCorrect option: A. an actual objectan actual objectView full question & answer→
MCQ 1821 MarkWhat is said to be as an object that belongs to class?✓ OperatorB FunctionalC InstanceD None of theseAnswerCorrect option: A. OperatorOperatorView full question & answer→
MCQ 1831 MarkWhat is created to store the data for the object by allocating memory?A An instance for an objectB A form of an object✓ Type of an objectD None of theseAnswerCorrect option: C. Type of an objectType of an objectView full question & answer→
MCQ 1841 MarkWhat is known as the process of creating an object in object oriented programming language?A Object instantiation✓ a and b bothC Class instantiationD None of theseAnswerCorrect option: B. a and b botha and b bothView full question & answer→
MCQ 1851 MarkWhat is the full form of OOP?✓ Object Oriented ProgrammingB Open Object ProgrammingC Onscreen Object ProgrammingD Only Object ProgrammingAnswerCorrect option: A. Object Oriented ProgrammingObject Oriented ProgrammingView full question & answer→
MCQ 1861 MarkWhich type of object does the garbage collector find?A Used✓ UnusedC a and b bothD None of theseAnswerCorrect option: B. UnusedUnusedView full question & answer→
MCQ 1871 MarkWhich of the following looks for unused objects and reclaims the memory?✓ Garbage collectorB Garbage objectC Garbage finderD Garbage engineAnswerCorrect option: A. Garbage collectorGarbage collectorView full question & answer→
MCQ 1881 MarkWhich type of memory spaces are allocated to different objects to keep their data value in Java?✓ DifferentB SameC Separate according to the classD Separate according to the methodAnswerCorrect option: A. DifferentDifferentView full question & answer→
MCQ 1891 MarkWhich of the following has its own set of data?✓ ObjectB ClassC MethodD Super classesAnswerCorrect option: A. ObjectObjectView full question & answer→
MCQ 1901 MarkInside which of the following is the actual data not contained?✓ In the ClassB In the ObjectC a and b bothD None of theseAnswerCorrect option: A. In the ClassIn the ClassView full question & answer→
MCQ 1911 MarkInside which of the following is the actual data contained?A In the ClassB In the Object✓ a and b bothD None of theseAnswerCorrect option: C. a and b botha and b bothView full question & answer→
MCQ 1921 MarkWhich of the following determines only the types of the variable?✓ ClassB ObjectC OperatorD MethodAnswerCorrect option: A. ClassClassView full question & answer→
MCQ 1931 MarkWhich statement can be written by combining statement Room r1; and r1 new Room0?✓ Room r1 = new Room 0;B rlRoom0;C Room r1 = new Room r2;D None of theseAnswerCorrect option: A. Room r1 = new Room 0;Room r1 = new Room 0;View full question & answer→
MCQ 1941 MarkWhich of the following statements states that object is not stored in variable rl, but variable ri1 contains the only address of an object?✓r1=newRoom0;Br1 = new Room0.Cr1=Room0;Dr1=Room;AnswerCorrect option: A. r1=newRoom0;r1=newRoom0;View full question & answer→
MCQ 1951 MarkWhat do the parentheses with arguments determine while creating an object?✓ Initial valueB Middle valueC Ending valueD None of theseAnswerCorrect option: A. Initial valueInitial valueView full question & answer→
MCQ 1961 MarkWhat is called by some empty parentheses without arguments?✓ Default constructorB None of theseC main0 methodD a and b bothAnswerCorrect option: A. Default constructorDefault constructorView full question & answer→
MCQ 1971 MarkWhich of the following is a statement to create an object of type Room and assign its address to variable r1?✓ r1 = new Room 0;B r1=Room0;C r1= = new Room 0;D r1 RoomAnswerCorrect option: A. r1 = new Room 0;r1 = new Room 0;View full question & answer→
MCQ 1981 MarkWhich special method is executed to perform initial task when an object is created in addition to allocating memory?A main0✓ constructorC a and b bothD Memory cartAnswerCorrect option: B. constructorconstructorView full question & answer→
MCQ 1991 MarkWhat is kept in heap?✓ ObjectB NumberC ProcessD IIAnswerCorrect option: A. ObjectObjectView full question & answer→
MCQ 2001 MarkWhat is called a special portion of memory where the objects live?✓ HeapB Memory boardC Object boardD Memory cartAnswerCorrect option: A. HeapHeapView full question & answer→