catch
Eclipseは、以下の私の声明について不平を言っています
public class NaturalLanguageMultiply
{
public class WrongMultiplierException extends Exception
{
}
private static int toInt( String number ) throws WrongMultiplierException
{
// removed for clarity
try
{
String numberKey = scanner.next();
if ( numberMap.containsKey( numberKey ) )
{
multiplier += ( Integer ) numberMap.get( numberKey );
}
else
{
throw new WrongMultiplierException();
}
}
次のキャッチラインについて不平を言います。
Syntax error on tokens
catch ( WrongMultiplierException );
{
}
}
また、StackOverflow が質問し続ける理由: あなたの投稿には、コード セクションを説明するコンテキストがあまりありません。シナリオをより明確に説明してください。FAQ やヘルプで答えが見つかりません。