+ 3

What happens if I import all the existing packages to my program? Will it get slower?

Java

5th May 2017, 8:20 AM
Danilo
Danilo - avatar
2 ответов
+ 6
I think there is no performance or overhead cost to doing so. Unused imports have no performance impact at runtime. Import statements only affect what happens during compile time.
5th May 2017, 11:16 AM
Vishnu C Nair
Vishnu C Nair - avatar
+ 1
No, unlike in C/C++ it won't get slower if you import all packages in java.
5th May 2017, 8:40 AM
Thanh Le
Thanh Le - avatar