Search:

Type: Posts; User: dicdic

Search: Search took 0.14 seconds.

  1. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    First fix the path of your FileReader.
    that must be a path.
    Scanner infile = new Scanner(new fileReader("TicketInvoice.txt"));
    change "TicketInvoice.txt" to its full path.
    it is okay to use not...
  2. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    used nextLine() method of scanner. that returns a string.
    try to print it :)

    but make sure to handle it with try-catch. you might end up with NoSuchElementException I guess.
  3. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    I guess you have compilation error right?
    FileReader throws FileNotFoundException, it is either you catch it using try catch or throws it.


    you parameter is String, that must be the file path of...
  4. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    You don't know how to write a code?
    hmm, so I think you should study the basics first.
    Since you have internet, try to visit this link:
    Java Tutorial
    that is a java tutorial for beginners.
  5. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    just paste here the code you have created. and i'm gonna check what is wrong with your code
  6. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    sorry for late response, its only 8:00 am here.. :D so i think i can assist you this whole day since i am not busy

    okay, next were going to open that file and read using FileReader.

    FileReader:...
  7. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    Okay. Let me give you a simple way to learn how to read and write to files using those classes.

    We will learn how to read it first.
    First, create a file (hello.txt) on you computer, put some text...
  8. Re: BeginnerJOptionPane( input/output) homework problem. PLEASE HELP!

    are there any compilation errors? runtime errors? bugs?
    if it does not have any errors, i think experience and practice will make you create a better coding, algorithm :)
    just continue programming...
Results 1 to 8 of 8