I'm reading someone elses code; they have a line like so:
InputStream is = getClass().getResourceAsStream("../../../../../../file.txt");
Why would you do this instead of using
File? Isn't the point of using the classloader to locate resources on the said classloaders classpath?