Assuming that all of the following classes are defined in separate source code files, select the incorrect statements.
package mypkg; //from www .java 2s. co m public class Sun { public Sun() {} } package stars; public class Sun { public Sun() {} } package skyies; import stars.Sun; // line1 import mypkg.Sun; // line2 class Sky { Sun sun = new Sun(); // line 3 }
b
Class Sky fails with the following error message:
Sky.java:3: error: stars.Sun is already defined in a single-type import import mypkg.Sun; ^ 1 error