I have a database file named "database.csv" in the folder named "database". In adddition to this I have a java file name "admin.java" in the folder controller, now what path should I give in the file "admin.java" to access the database file.
There are two types of referencing
If you want to use Absolute, then you should give path of your database like "C:\JavaProject\database\database.csv"
Or if you want Relative, then your database path should be like "\database\database.csv"
The advantage of relative referencing is that you can move your project to any location in future you will not have to change the path of the database. But if you use absolute referencing, you will need to change the path of your database accordingly.