Ask Experts Questions for FREE Help !
Ask
    koolguy251's Avatar
    koolguy251 Posts: 1, Reputation: 1
    New Member
     
    #1

    Apr 2, 2013, 03:31 PM
    PrintWriter object throws FileNotFoundException
    I keep getting a FileNotFoundException when I input this code in netbeans. I created a "File" object with the location of a text file on my computer and it found it. But when I use that same "file" object as a location for a PrintWriter Object, I get a"FileNotFound Exception. Can anyone help me?

    import java.io.*;



    public class HW1Q3
    {
    File file = new File("C:\\Users\\koolguy251\\Documents\\Work\\CST4 713\\hw1Notes.txt" );
    PrintWriter out = new PrintWriter( file );

Check out some similar questions!

A change in the gravitation force acting on an object will affect the object's [ 1 Answers ]

A.mass B.coefficient of static friction C.weight D.inertia

Stopping lg object sliding vs stopping lg object rolling [ 1 Answers ]

Why is it easier to stop a large object that is sliding vs stopping a Large object that is rolling?

Object doesn't contain automation object [ 1 Answers ]

Scrolling through Northwind Database sample. 'Opening the "Customer Phone List" Form. When I click on the alphabets below, I receive an information that the "The object doesn't contain the Automation object 'RecordsetClone.'" Please can you explain why and can you help me out? I want to design...

The object doesn't contain the Automation object '|.' [ 1 Answers ]

Hello, And thank you for taking this question. I currently support a small Access system and ran into the error mentioned in the title. I believe that the issue is system-specific because I ran the system from my desktop and printed fine. The issue centers around the cmdPrint command function. ...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.