Ask your own question, for FREE!
Computer Science 23 Online
OpenStudy (anonymous):

Please help new to java, an easy one, but I am confused. a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for that week. The application should then print out the name of the employee and the weekly pay amount. In the printout, display the dollar symbol ($) to the left of the weekly pay amount and format the weekly pay amount to display currency.

OpenStudy (konradzuse):

how much java do you know? this is fairy easy..

OpenStudy (koikkara):

have a look at... http://www.javamex.com/tutorials

OpenStudy (anonymous):

Ths is my first class, and this is whatI have. Scanner kb = new (Scanner( system.ini); seems to be where my problem is at

OpenStudy (lyrae):

If you're using Scanner to read a file, you have to pass it a file object: Scanner kb = new Scanner(new File("file.txt")); If you want to read input from the console using a Scanner you can do it like this: Scanner kb = new Scanner(System.in); kb.readLine(); Or using a bufferedReader: BufferedReader kb = new BufferedReader(new InputStreamReader(System.in)); kb.readLine(); Also, if there is no special reason to so, you should refrain from using the native wrapper classes (Integer, Double) and use the respective native types (int, double) instead.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!