I wrote a java program that takes input from a file and writes it to another file, but my program is saying that the file cannot be found. Any suggestions? My file is saved under the src file.
What IDE are you using?
assuming eclipse, it should be fine in the project folder. for example imagine a project using 10 text files named BabyNames(2001-2010).txt the hierarchy could look something like, and could be used like so: ``` Scanner sc = new Scanner(new File("Babynamesranking2004.txt")); ```
hey y'all, sorry. I was using NetBeans and the file path was FileInputStream("textin.txt")
not really sure, never used netbeans. try making sure it's in the project folder by dragging "testin" to the project folder (for example in this screenshot http://jcop.sourceforge.net/images/user/netbeans-add-jar.png it'd be JcopTest)
Join our real-time social learning platform and learn together with your friends!