| Author |
Cannot be applied to (java.io.PrintWriter) error
|
Rob Long
Greenhorn
Joined: Jan 06, 2009
Posts: 2
|
|
Hi guys I get the following errors when trying to compile this PayApp program and I was wondering how to solve it
printPay() in PaySlip cannot be applied to (java.io.PrintWriter)
slip.printPay(slipWrite)
|
 |
Gamini Sirisena
Ranch Hand
Joined: Aug 05, 2008
Posts: 347
|
|
Read the error again.
Try to relate the information (keywords, identifiers etc.) given in the error to your program and find what might be wrong.
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Extra hint, what variables does the method that you are calling take? Take a look at your method signature....
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Rob Long
Greenhorn
Joined: Jan 06, 2009
Posts: 2
|
|
Hi,
Thanks for the advice so far. I have removed the slipwrite within the brackets and the program runs ok. I was wondering if this would effect my ability to write results to a txt file for example.
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Well writing to a file would involve different APIs, I'd recommend starting at the Sun tutorial.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Cannot be applied to (java.io.PrintWriter) error
|
|
|