MCQ Answer

Which among the following is the correct construct for creating an object named ‘book’ of the ‘Library’ class?

Which among the following is the correct construct for creating an object named ‘book’ of the ‘Library’ class?

Topic : JAVA Class and Objects

A. Library book=new Library;

B. book =new Library();

C. Library() book=new Library();

D. Library book=new Library();




Correct Answer is :

D. Library book=new Library();



Explanation
Library book=new Library(); is correct format to create an object book of Library Class.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad