Not able to run in command prompt
By bloodmask
@bloodmask (590)
India
August 7, 2012 9:22pm CST
I tried this code in elipse IDE and tried to run in command.exe this code.
_______________________________________________________________________________
This is main class in////
package com.practiclejava.lesson5;
class TestTax {
public static void main(String[] args) {
if(args.length != 3){
System.out.println("Sample usage of the program "+
" java TestTax 50000 NJ 4");
System.exit(0);
}
Tax t = new Tax(args[0], args[1], args[2]);
double tax = t.calcTax();
System.out.println("Your tax is: "+ tax);
}}
____________________________________________________________________________________
This is another class in another file//
package com.practiclejava.lesson5;
class Tax {
double grossIncome;
String state;
int dependednt;
Tax(String grossIncome, String state, String dependent){
this.grossIncome = Double.parseDouble(grossIncome);
this.state = state;
this.dependednt = Integer.parseInt(dependent);
}
public double calcTax(){
double stateTax =0;
if(grossIncome
No responses

