Computer Science, asked by sarkarsid, 10 months ago

Given the class Book in packages p1 and class Main in package p2. In main to create an object of Book, which of the
following are valid.
Select one:
a. p1.Book bookObj=new p1.Book();
b. Book bookObj=new Book();
c. p1.Book bookObj=new Book();​

Answers

Answered by chikkupotter07
5

Answer:

option ( B ) is right

Book bookObj=new Book ();

hope you understand

Answered by pathrutvb
13

Answer:

A

Explanation:

We need to give complete path to create an object in package 2 bz the class book is in different package.

Similar questions