私は何が間違っているのかを判断しようとして、何時間も Java の教科書を精査してきました。私が戻ってきたエラーは、コードのある行である13行目の「シンボルが見つかりません」です。
System.out.println("The three initials are " +
getInitials(Harry, Joseph, Hacker));
命令はコード内でコメント化されています。私が設定した名前と関係があると確信しています..しかし、よくわかりません。
public class InitialsTest {
/**
Gets the initials of this name
@params first, middle, and last names
@return a string consisting of the first character of the first, middle,
and last name
*/
public static void main(String[] args) {
System.out.println("The three initials are " +
getInitials(Harry, Joseph, Hacker));
}
public static String getInitials(String one, String two, String three) {
String initials = one.substring(0,1) + two.substring(0,1) + three.substring(0,1);
return initials;
}
}