Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これまでのところ、Constructor クラスを必要としないメソッドは見つかりませんでした。
このクラスは、Java ME では使用できません。
他に方法はありますか?
クラスのコンストラクターはパラメーターを取ることに注意してください。
これはあなたが探しているものですか?
String className = "java.lang.String"; Class theClass = Class.forName(className); // this line will call the empty constructor String s = (String) theClass.newInstance();
http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/java/lang/Class.html#newInstance%28%29