A flag may have the value标识可能的值:
A. 0 or 1
B. +1 or -1
C. true or false
D. of any character 任意字符
查看答案
If chr is a character variable, which of the following if statements is written correctly?如果chr是字符变量,那么以下哪个if语句编写正确?
A. if (chr = "a")
B. if (chr == "a")
C. if (chr = 'a')
D. if (chr == 'a')
In Java, when a character is stored in memory, it is actually stored as a(n)_____.在Java中,当字符存储在内存中时,它实际上存储为_____.
A. Unicode numberUnicode编码
B. ASCII character code ASCII字符代码
C. EBCDIC character code EBCDIC字符代码
D. Morse code 摩尔斯电码
This is an international coding system that is extensive enough to represent all the characters of all the world’s alphabets:这是一个国际编码系统,范围广泛,足以代表世界上所有字母的所有字符:
ASCII
B. Unicode
C. Java
D. None of the above
What will be the values of ans, x, and y after the following statements are executed?执行以下语句后,ans,x和y的值是什么?int ans = 35, x = 50, y =50;if ( x >= y){ans = x + 10;x -=y;} else {ans = y + 10;y += x;}
A. ans = 60, x = 50, y =100
B. ans = 60, x =0, y =50
C. ans = 45, x = 50, y = 0
D. ans = 45, x = 50, y = 50