file.getCanonicalPath()
would just return "members.s"
as its path and not the full path.
getCaninicalPath()
removes redundant .
or ..
from the pathname.
Because FileInputStream
takes File
as its argument (also a string btw) and File
takes a String
as argument.
File file = new File("members.s");
System.out.println(file.getCanonicalPath());
FileInputStream fileIn = new FileInputStream("C:\\Users\\users\\Documents\\NetBeansProjects\\CWA2\\members.s");
This should be
File file = new File("C:\\Users\\users\\Documents\\NetBeansProjects\\CWA2\\members.s");
FileInputStream fileIn = new FileInputStream(file);