-4

I know that a reason why java files may not be referenced elsewhere in the code is they may be valid tests which obviously do not need to be referenced elsewhere, but are there any other reasons that there may be java files which exist and are never referenced again, without it being dead code?

EDIT: Yeah, I mean source files.

ftlog
  • 11
  • 4

1 Answers1

0

Java code does not refer to java files. So, assuming that by Java files you mean classes (types), then by your definition most of the JDK is useless, dead code.

This, obviously, is false. Java (and the libraries written in Java) provide you with tools to write your code. You use those you need. Other developers may need other tools or you may need them at a different time, so they need to be available.

Sotirios Delimanolis
  • 274,122
  • 60
  • 696
  • 724