Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do unused imports in java effects performance and consume memory? [duplicate]

import java.io.*;
class Myclass
{
 //Some programming code that does not call any java io package methods or variables
}

Is that program takes more memory or even worse affect performance of the software/app than the program that has no unused imports?

like image 917
Javasamurai Avatar asked Oct 20 '22 09:10

Javasamurai


1 Answers

No, imports are a compile-time feature (they have no meaning in the compiled code). They do not affect runtime behavior.

like image 93
M A Avatar answered Oct 27 '22 09:10

M A