2

Possible Duplicate:
Why is using a wild card with a Java import statement bad?
Performance difference between a wild card import and the required class import

What are the implications of importing a java package using .* versus specifying a package explicitly. For example,

import java.lang.annotation.Annotation;

instead of

import java.lang.annotation.*;

Are there penalties at compile time or run time when using wild card?

Community
  • 1
  • 1
rpat
  • 279
  • 2
  • 5
  • 12

1 Answers1

4

Absolutely no effect on run time.

Wildcard imports are probably marginally slower at compile-time, but I wouldn't think you'd need to care.

Thilo
  • 257,207
  • 101
  • 511
  • 656