次の Apex コードを参照してください。 デバッグ ログに書き込まれるときの x の値は何ですか?
正解:C
* Execution Flow: * Thedo-whileloop executes the body of the loop before evaluating the condition. * Initialx = 0. * Inside the loop:x = 1(reassignment) and then incremented to2. * The conditionx < 1is false after the first iteration, so the loop exits. Debug Output:System.debug(x)logs2.