Question: Given the following class, which of these alternatives are valid ways of referring to the class from outside of the package net.basemaster? Select the two

Given the following class, which of these alternatives are valid ways of referring to the class from outside of the package net.basemaster?

package net.basemaster; public class Base { }

Select the two correct answers.

(a) By simply referring to the class as Base

(b) By simply referring to the class as basemaster.Base

(c) By simply referring to the class as net.basemaster.Base

(d) By importing with net.basemaster.*, and referring to the class as Base

(e) By importing with net.*, and referring to the class as basemaster.Base

package net.basemaster; public class Base { }

Step by Step Solution

3.42 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c and d A class or interface name can be referred to by using either its fully qu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!