Question: Which import statements, when inserted independently at (1), will make the code compile? Select the four correct answers. (a) import mainpkg.*; (b) import mainpkg.subpkg1.*; (c)

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

// File: Window.java package mainpkg.subpkg1; public class Window {} // File: Window.java

Select the four correct answers.

(a) import mainpkg.*;

(b) import mainpkg.subpkg1.*;

(c) import mainpkg.subpkg2.*;

(d)

package mainpkg.subpkg2; public class Window () // File: Screen.java package mainpkg; //

(e)

(1) INSERT IMPORT STATEMENTS HERE. public class Screen ( private Window win;

(f)

}

(g)

image text in transcribed

// File: Window.java package mainpkg.subpkg1; public class Window {} // File: Window.java package mainpkg.subpkg2; public class Window () // File: Screen.java package mainpkg; // (1) INSERT IMPORT STATEMENTS HERE. public class Screen ( private Window win; }

Step by Step Solution

3.52 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

b c d and e a The import statement imports types from the mainpkg package but Wind... 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!