<> Zero , Single choice

* If so a=3, Then execute the following statement a The value of is ? a+=a*=a;
A. 3
B. 12
C. 9
D. 18
analysis ： Reference analytic assignment is performed from right to left , so a=a*a=9,a+=9,a=a+9=3+9=12

* For a three digit positive integer n=789, The following results are 8 Yes ?
A. n/10%2
B. (n-n%10)/100
C. n%10
D. n%100/10

analysis : The comprehensive application of operator in this question ,/ Is the division operator ,% Is the remainder operator , The result is the remainder after division .A option ,n/10=78,78%2=0,n/10%2 The result is ：0;B option ,n-n%10=780,(n-n%10)/100 The result is ：7;C option ,n%10 The result is ：9;D option ,n%100=89,89/10=8,n%100/10 The result is ：8. therefore ,D The option is correct .

* In the following operator , Which is used to perform the division operation ?
A. /
B. \
C. %
D. *
analysis ： This question examines the operator ,A option / Division is used to perform the operation , therefore A The option is correct .B Option is not Java operator .C Option is the operator for the remainder . D The option is a multiplication operator .

* The output of the following code is ? int m=5,n=6; int x=(m+n)+n; int y=(--m)+n; System.out.print("x="
+x+","); System.out.println("y="+y);
A. x=11,y=11
B. x=10,y=11
C. x=10,y=12
D. x=12,y=10

analysis ： This question examines the self increasing and decreasing operators ,A The option is correct .m++ Is to participate in the operation first and then add , therefore x=(m++)+n=5+6=11; After assignment m=6,–m First self subtraction, then participate in the operation , therefore y=(–m)+n=11, After assignment m=5. so x=11,y=11.

5. The output of the following block is ：
int a=2; System.out.print(a++); System.out.print(a); System.out.print(++a);
A. 333
B. 334
C. 234
D. 233

analysis ： This question examines the self increasing and decreasing operators .a++ Is to participate in the operation first and then add , So the first output 2, Second output 3,++a It is self adding first and then participating in the operation , So the third output 4. therefore ,C The option is correct .

* The following variables are set , Which of the following statements compile without errors ? char c='c'; int i=10; double d=10; long l=1; String s=
"Hello"; int a=2;
A. c=c+i;
B. s+=i;
C. i+=s;
D. c+=s;