if statement or method not working
hereis my code:
import java.lang.String;
public class timeconverter {
public static void main(String[]args) {
// choose
String choice = null;
double num = 0;
EasyReader console = new EasyReader();
System.out.println("Please enter witch one you want to convert of the following.");
System.out.println("\n hours-minites, days-hours, minites-hours, hours-days");
choice = console.readWord();
System.out.println("what number would you like to convert it from?");
num = console.readDouble();// the number of units to convert to anther unit
choice.toLowerCase();
if (choice == "hours-minites")
{ hoursToMinites(num); }
else if (choice == "days-hours")
{ daysToHours(num); }
else if (choice == "minites-hours")
{ minitesToHours(num); }
else if (choice == "hours-days")
{ hoursTodays(num); }
else {
System.out.println("no match " + choice); }//debug
}
public static void hoursToMinites(double num) {
System.out.println( num + " hours = " + (num * 60)+ " minites");
}//hoursToMinites end
public static void daysToHours(double num) {
System.out.println( num + " days = " + (num / 24)+ " hours");
}//daysToHours end
public static void minitesToHours(double num) {
System.out.println( num + " minites = " + (num / 60)+ " hours");
}// minitesToHours end
public static void hoursTodays(double num) {
System.out.println( num + " hours = " + (num * 24)+ " days");
}//hoursToDays end
}//class end
here is my output:
Please enter witch one you want to convert of the following.
hours-minites, days-hours, minites-hours, hours-days
days-hours
what number would you like to convert it from?
2
no match days-hours
as you can see the string choice is assigned the value "days-hours" and it should trigger the if if statement to run daysToHours but it does not. Also i put in a else to show the vale if it does not find anything that equals it and it is the (same thing as the if statement) but the if statement will not work or the method maybe. It would be great if someone could show me what im doing wrong. thanks

