Does an unused import declaration eat memory, in Java?

后端 未结 5 1730
渐次进展
渐次进展 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:06

    No, compiler removes them after compilation. But two issue you may face

    1. code clutter
    2. If you import some classes from jar and later removed jar but not imports, then you may get compile time error

提交回复
热议问题