Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TimePass;
- /**
- *
- * @author toffe boy Aamir
- Determines if the specified character may be part of a Java identifier as other than the first character.
- A character may be part of a Java identifier if any of the following are true:
- ○ it is a letter
- ○ it is a currency symbol (such as '$')
- ○ it is a connecting punctuation character (such as '_')
- ○ it is a digit
- ○ it is a numeric letter (such as a Roman numeral character)
- ○ it is a combining mark
- ○ it is a non-spacing mark
- */
- public class JavaIdentifierPart {
- public static void main(String[] args) {
- char c;
- System.out.println("Java Identifier Part");
- for (c = '\u0041'; c <= '\u005a'; c++) {
- boolean javaIdentifierPart = Character.isJavaIdentifierPart(c);
- System.out.format("%c, %b\n", c, javaIdentifierPart);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement