This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am a first year student and have an issue that I suspect is very simple and hope that someone can help me out! I am looking to take in a value via a dialogue, parse it to Integer and then validate that it is greater than 600. I am getting one <identifier> expected error on line 21. Help please!!
I couldn't answered this faster if you'd indicated which was line 21; try to do that next time, OK?
It's this line:
public static boolean checkFee( inFee )
You have to specify a data type for the parameter "inFee". In main(), you're passing "inputFee" as the argument, but I think that's an error; you presumably want to check the number, not the String, so I think you want to pass "fee". Then you can change "fee" from being a static member to just being a local variable in main(). Make sense? SO with that change, line 21 would be something like
Thanks Ernest, Edwin and Marc - and yes I will include the line in question in future!
I have made the change as suggested and have a new error message I assure you that I have spent hours trying to resolve this and other issues today - I am not just taking the easy route. Any thoughts would be thankfully received!
cannot find symbol symbol : method showMessageDialog(<nulltype>,int,java.lang.String,int) location: class javax.swing.JOptionPane JOptionPane.showMessageDialog(null, fee, " Successful Result", JOptionPane.PLAIN_MESSAGE );
The dot between JOptionPane.showMessageDialog is highlighted as being problematic [ April 27, 2008: Message edited by: Al Hendo ]