The magic Rjava

A project's R.java is an auto-generated file indexing all the resources of your project. You use this class in your source code as a sort of shorthand way to refer to resources you've included in your project. This is particularly powerful with the code-completion features of IDEs like Eclipse because it lets you quickly and interactively locate the specific reference you're looking for.

Additionally you gain compile-time safety that the resource you want to use really exists.

0 0

Post a comment