### Specification Java SE 17, ### section 3.5 Input Elements and Tokens The Input production is ambiguous, meaning that for some sequences of input characters, there is more than one way to reduce the input characters to input elements (that is, to tokenize the input characters). Ambiguities are resolved as follows: A sequence of input characters that could be reduced to either an identifier token or a literal token is always reduced to a literal token. A sequence of input characters that could be reduced to either an identifier token or a reserved keyword token (§3.9) is always reduced to a reserved keyword token. A sequence of input characters that could be reduced to either a contextual keyword token or to other (non-keyword) tokens is reduced according to context, as specified in §3.9. If the input character > appears in a type context (§4.11), that is, as part of a Type or an UnannType in the syntactic grammar (§4.1, §8.3), it is always reduced to the numerical comparison operator >, even when it could be combined with an adjacent > character to form a different operator. Without this rule for > characters, two consecutive > brackets in a type such as List> would be tokenized as the signed right shift operator >>, while three consecutive > brackets in a type such as List>> would be tokenized as the unsigned right shift operator >>>. Worse, the tokenization of four or more consecutive > brackets in a type such as List>>> would be ambiguous, as various combinations of >, >>, and >>> tokens could represent the >>>> characters.