I've started to learn java and was coding this for some practice. please tell me where I went wrong, it says I have an illegal start of expression on line 27.
import java.util.Scanner;
public class steps
{
public static void main(String []args)
{
Scanner Keyboard = new Scanner(System.in);
print("What is your name?");
String name = Keyboard.nextLine();
print("What is five + five?");
String number = Keyboard.nextLine();
String gj = (", Good Job");
switch (number){
case "ten":
print("correct" + gj + (" ") + name);
break;
case "Ten":
print("correct" + gj +(" ") + name);
break;
case "10":
print("correct" + gj +(" ") + name);
break;
default:
print("Wroung try again");
}
static void print(String s) { // <--- this is line 27
System.out.println(s);
}
}
// <--- there is no trailing } here?