Question: Which method call can be inserted at both (1) and (2), so that the following code will still compile? Select the one correct answer. (a)

Which method call can be inserted at both (1) and (2), so that the following code will still compile?

// File : Firm.java interface INewSlogan { } // String SLOGAN =

Select the one correct answer.

(a) printSlogan();

(b) co.printSlogan();

(c) sl.printSlogan();

(d) Firm.printSlogan();

(e) INewSlogan.printSlogan();

// File : Firm.java interface INewSlogan { } // String SLOGAN = "Trouble shared is trouble halved!"; static void printslogan () { System.out.println (SLOGAN) ; } public class Firm implements INewSlogan { public static void main (String [] args) { Firm co new Firm (); INewSlogan sl = co; // (1) INSERT THE STATEMENT EXPRESSION HERE. } void testslogan () { Firm co = new Firm(); INewSlogan s1 = co; // (2) INSERT THE STATEMENT EXPRESSION HERE.

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

e The static method printSlogan is not inherit... 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!