与えられたクラス賞 :
public class Award {
/*
*
*/
// fields of the class
Award()
{
// some initializations
}
Main からこのコンストラクターを呼び出そうとしています:
try
{
Award myAward = Award.class.getConstructor().newInstance();
myAward.calculateAward();
}
catch (Exception e)
{
e.printStackTrace();
}
しかし、それは例外ブロックに入り、NoSuchMethodException 例外を生成します。
どうしたの ?
ありがとう !