else if (answer.equals("check value")){
System.out.println("Of what?");
System.out.println("Tax, Donations, Income, Profit, Expenditure, Services, Military, City or Economy.");
System.out.println("Do not use caps and spell it correctly otherwise it will not be recognised.");
String valueToCheck = scan.nextLine();
if (valueToCheck == "tax"){
System.out.println(tax);
}else if (valueToCheck == "donations"){
System.out.println(donations + "donations per turn");
}else if(valueToCheck == "income"){
System.out.println(incomePerTurn + " income per turn");
}else if(valueToCheck == "profit"){
System.out.println(profitPerTurn + " profit per turn");
}else if(valueToCheck == "expenditure"){
System.out.println(expenditurePerTurn + "expenditure per turn");
}else if(valueToCheck == "services"){
System.out.println(servicesBudget + " to services budget");
}else if(valueToCheck == "military"){
System.out.println(militaryBudget + " to military budget");
}else if(valueToCheck == "city"){
System.out.println(cityBudget + " to cities budget");
}else if(valueToCheck == "economy"){
System.out.println(economy + " to total economy");
}
newTurn();}
Hello, whenever I run my program and type 'check value' I get no errors, in fact I get nothing. I am just wondering why nothing is returned. Thanks for any help!