Can I import same package/class twice? Will the JVM load the package twice at runtime? Ans. One can import the same package or same class multiple times. Neither compiler nor JVM complains about it. And the JVM will internally load the class only once no matter how many times you import the same class. - Study24x7
Social learning Network
18 Nov 2023 11:30 AM study24x7 study24x7

Can I import same package/class twice? Will the JVM load the package twice at runtime? Ans. One can import the same package or same class multiple times. Neither compiler nor JVM complains about it. And the JVM will internally load the class only once no matter how many times yo...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles