answersLogoWhite

0

yes you can do that. The compiler does not complain about the fact that you imported a package or class more than once. However if you use an IDE like Eclipse it will tell you that you are using the same import multiple times. So remove it.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the use of import statement in Java program briefly?

Classes in Java are organized into packages - a hierarchical structure much like folders and files on a computer. When you use a class in your source code, the compiler needs to know where to look to find those classes. By default, it will search within the current package and in the java.lang package; a path to any other classes must be defined somewhere.There are two ways to do this.The first is to explicitly state it whenever you use the class name. This should only be used when you know you will only use the class name once or twice since it produces such messy code:java.util.ArrayList myList = new java.util.ArrayList();In contrast is the import keyword, which expands the areas Java will search for classes.Adding this line will ensure that any time you refer to an "ArrayList" in your code, the compiler will know to look in the java.util package for it.import java.util.ArrayList;


Is it possible to get an offer from student exchange program twice?

Yes, it is possible to get an offer twice.


Is it possible to make more food by doubling the recipe?

No that is not possible Obviously 'doubling' is twice as much. Twice the ingredients and twice the work equals twice the results. Do it times a 1000 and you have 1000 times the results!


Can you give hsc class improvement exam twice?

no


What is half of 8 but not twice 2?

Not possible


Is it possible for me to apply to a job twice?

Yes, it is possible to apply to a job twice, but it is important to follow the employer's guidelines and consider whether it is appropriate to do so.


Is it possible to deposit a check twice?

No, it is not possible to deposit a check twice. Doing so would be considered fraud and could result in legal consequences.


When a die is rolled twice there are how many possible outcomes?

There are 36 possible outcomes.


Can a baby have the Roseola virus twice?

It is very uncommon, but yes it is possible to have the Roseola virus twice.


Is it possible to deposit the same check twice?

No, it is not possible to deposit the same check twice as the bank's system will detect duplicate deposits and prevent it from being processed.


Is it possible to brew coffee twice?

Yes, it is possible to brew coffee twice, but the resulting brew may be weaker and less flavorful than the first brew.


How many amps does a typical motorcycle starter draw?

About 85 amps for an average import motorcycle. Closer to twice that for a Harley-Davidson.