String firstname , middlename , lastname ;
firstname = fn.getText().substring(0,1);
middlename = mn.getText().substring(0,1);
lastname = ln.getText();
String shortname = shortname.concat(lastname); // error is in this line, shortname.concat
shortname = shortname.concat(" ");
shortname = shortname.concat(firstname);
shortname = shortname.concat(".");
shortname = shortname.concat("middlename");
shortname = shortname.concat(".");
shrt.setText(shortname);
沒有其他行有任何錯誤。只是shortname
變量未初始化。變量未被初始化
注:易於解決方案請。我在第11課。做這個JAVA沒有文字書。
請編輯您的文章,並附上錯誤[stack trace](http://en.wikipedia.org/wiki/Stack_trace) – Christian
@Christian,這是一個編譯錯誤;) –