Does an unused import declaration eat memory, in Java?

后端 未结 5 1732
渐次进展
渐次进展 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 impact any rumtime-compiler time,

    but best approach is to write the clearest and simplest code you can as this improves the maintainability of the code and helps ensure it performs reasonably well even after it is changed.

    Documentation: Best Practices for Performance

提交回复
热议问题