import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
String input = "";
Scanner in = new Scanner(System.in);
System.out.println("math");
input= in.nextLine();
math(input);
System.out.println("end");
public static void math (String input)
{
if (input=="a" || input=="A")
{
System.out.println("4.0");
}
else if (input== "A-" || input== "a-")
{
System.out.println("3.7");
}
//etc
}
}
What is being printed out is this:
math
a (I entered "a" as input)
end
My method section is being skipped completely! I know that I am calling my method right cuz I did it for a different project last week and legit just copy and pasted the format over!