Code: Select all
line 26 states "cannot find symbol."
line 36 states "not a statement. ';' expected.
line 39 states unreachable statement.
< /code>
Ich habe seit einer Stunde mit diesem Code gespielt und habe fast aufgegeben. Irgendwelche Hilfe? < /P>
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package lab11;
import java.util.Scanner;
/**
*
* @author xxxxxx
*/
public class Lab11 {
public static void main(String[] args) {
System.out.println("Enter your name: ");
Scanner user_input=new Scanner(System.in);
changeNameFormat();
System.out.println(lastName+", " + firstName);
System.out.println("Enter a word. ");
palindrome();
}
public static String changeNameFormat() {
String firstName, lastName;
firstName, lastName = user_input.nextLine;
return lastName;
return firstName;
}