I am trying to read the resource by the class loader.
but meanwhile, I found that , the class object also could finish such a thing.
my code is like this.
Teacher.class.getResource("1.txt");
Teacher.class.getClassLoader.getResource("1.txt");
the two ways could get the resource I wanted, however, I don't understand the underlying theory.
Is there anybody who can help me ?