0

Static import gives direct benefit of not using the class name and access the static fields directly like

import static java. Lang. System;

will allow us to use out.println directly instead of System.out.println. Does the loading of such classes like the ones I define manually be different from loading of non static import of same classes?

hi.nitish
  • 2,732
  • 2
  • 14
  • 21
  • The other questions may look similar but they do not have any answer to say about loading of static import. I am asking from perspective of class loaders. – hi.nitish Jul 23 '17 at 03:56
  • Statics are loaded eagerly but not sure about static import of a non static class. – hi.nitish Jul 23 '17 at 04:01

0 Answers0