I have been working on this for three days and I can't figure this out for anything. Please help!
public static void displayType (String ntype)
{
switch (ntype)
case "African":
System.out.print ("This Elephant is African")
break;
case "Indian":
System.out.print ("This Elephant is Indian")
break;
default :
System.out.print ("This type of Elephant is invalid")
return ntype;
} //End Switch
}
These are the errors that I am getting:
Lab2Unit4Psuedocode.java:108: error: class, interface, or enum expected
public static void displayType (String ntype)
^
Lab2Unit4Psuedocode.java:116: error: class, interface, or enum expected
case "Indian":
^
Lab2Unit4Psuedocode.java:120: error: class, interface, or enum expected
default :
^
Lab2Unit4Psuedocode.java:124: error: class, interface, or enum expected
} //End Switch
^
4 errors