Java Code Output Prediction: While Loop with Pre/Post Increment/Decrement
Predict the output of the following Java code:
int m = 4, n = 15;
while(m++ < --n) {
System.out.println(m + " " + n);
}
Options:
A. 9 9 B. 8 9 C. 10 10 D. 10 9
Correct Answer:
B. 8 9
原文地址: https://www.cveoy.top/t/topic/ozU4 著作权归作者所有。请勿转载和采集!