I have a doubt, whether the unused imports and unused objects in Java code create any performance impact?
Suppose an object is initialized and never used, what happen
Yes it impact a bit on performance, if we are referring unused import statement in our java class. The Java compiler will check for references mentioned into the import statement and at minute level it impact on the performance of the your class.
Thanks