Question: Which import statement, when inserted independently at (1), will make the code compile? Select the one correct answer. (a) import app.*; (b) import app.Window; (c)

Which import statement, when inserted independently at (1), will make the code compile?

//File: Window.java package app; public class Window ( final static String frame

Select the one correct answer.

(a) import app.*;

(b) import app.Window;

(c) import java.lang.*;

(d) import java.lang.String;

(e) import static app.Window.frame;

//File: Window.java package app; public class Window ( final static String frame = "Top-frame"; } // File: Canvas.java package app; // (1) INSERT IMPORT STATEMENT HERE. public class Canvas { private String str = frame; }

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

e Both classes are in the same package app so the first two impor... 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!