This is quoted from the answer explanation of question # 8 on exam # 3 for ver 1.2, I believe. I plan on taking the 1.4 version of the exam very soon. Does anyone know if it is possible that there will be any questions that puposely don't have a correct answer listed as an option...that is, the correct answer is to not check anything?
You may get questions in the exam that have no apparently correct answer. If you are absolutely sure this is the case, do not check any of the options.
String s = new String("abc") ; // creates two objects, and one reference var
The char data type (and therefore the value that a Character object encapsulates) are based on the original Unicode specification, which defined characters as fixed-width 16-bit entities. The Unicode standard has since been changed to allow for characters whose representation requires more than 16 bits. The range of legal code points is now U+0000 to U+10FFFF, known as Unicode scalar value...
The set of characters from U+0000 to U+FFFF is sometimes referred to as the Basic Multilingual Plane (BMP). Characters whose code points are greater than U+FFFF are called supplementary characters.
A char value, therefore, represents Basic Multilingual Plane (BMP) code points, including the surrogate code points, or code units of the UTF-16 encoding. An int value represents all Unicode code points, including supplementary code points...
The methods that accept an int value support all Unicode characters, including supplementary characters.
public int indexOf(int ch)
Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index (in Unicode code units) of the first such occurrence is returned. For values of ch in the range from 0 to 0xFFFF (inclusive),...
ch - a character (Unicode code point).