Does an unused import declaration eat memory, in Java?

后端 未结 5 1716
渐次进展
渐次进展 2020-12-05 17:56

Does an unused import like so - import android.widget.RelativeLayout; eat memory? Just want to know about how much or just is it valuable? Maybe this is stu

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 18:14

    No impact at runtime. It can make the compiling process a very tiny bit (unmeasurable) slower. But as far as having them, it's better to remove them because it makes the files smaller and it makes it easier to read what imports are actually being used.

提交回复
热议问题