Check out example codes for "java resource file". It will help you in understanding the concepts better.

Code Example 1

File file = new File(
	getClass().getClassLoader().getResource("database.properties").getFile()
);

Code Example 2

InputStream inputStream = getClass()
		.getClassLoader().getResourceAsStream("database.properties");

Learn ReactJs, React Native from akashmittal.com