I have a program that gives the user a survey and saves the data gathered to different binary files for different political parties. I have this class:
public class MyClass { //PoliticaParty is an enum for political parties (Republican, Democrat, and Libertarian public PoliticalParty party; private final String filePath; private List<byte[]> previousSurveyData; public ProbabilityManager(PoliticalParty party) { this.party = party; filePath = "data/" + party.name().toLowerCase() +".bin"; previousSurveyData = SurveyFilesIO.readFromBinaryFile(filePath); //The filepath is passed to the above method from another class I have to read the information. }
Whenever I run this, I get a FileNotFoundException. I would really appreciate some help.Thanks!
I'm writing this in Eclipse, so I was trying to see if I need to have a resources folder in there, but I'm not sure about that. I'm going to be sending the finished project to someone, so I just don't want to run into any issues. I have mostly worked with text files, so this is unfamiliar territory.