ステートメント(printステートメントなど)とメンバーの割り当てをKotlinで混在させる方法はありますか?任意の入力のためのKotlinコンストラクタのステートメント
class MySystem {
ComponentA componentA;
ComponentB componentB;
public MySystem() {
System.out.println("Initializing components");
this.componentA = new ComponentA();
System.out.println("Constructed componentA");
this.componentB = new ComponentB();
System.out.println("Constructed componentB");
}
}
感謝、感謝: は、ここで私は(Javaで)やりたいものの一例です。
ありがとうございました:私は自分でそれに答える予定はありませんでしたが、質問を書き留めたら、コードをIntelliJに貼り付けてKotlinに翻訳しました。 – f1confusion