That shouldn't even compile.
} else if()) {
Not only is the if statement empty, but there is an extra bracket.
Furthermore:
private string line;
string should be a capital S: String
Type: Posts; User: aussiemcgr
That shouldn't even compile.
} else if()) {
Not only is the if statement empty, but there is an extra bracket.
Furthermore:
private string line;
string should be a capital S: String
Most likely because typeH has not been initalized. Look at this code:
if(input.nextLine().toLowerCase().contains("s")) {
typeH = "salaried";
} else...
There is no variable named type, perhaps you meant to use typeH instead.
Also, it is almost never a good idea to compare String with ==. String are objects, so you should use the .equals() method...