Download presentation
Presentation is loading. Please wait.
Published byAmbrose Bradley Modified over 8 years ago
2
DEFINITION Java IDE created by Xinox Software JCreator is a powerful interactive development environment (IDE) for Java technologies. A Java compiler
3
TOKENS characters that are grouped into symbols
4
DIFFERENT TYPES OF TOKEN
5
SYNTAX characters and symbols and their structure used to code the class using Unicode characters.
6
IDENTIFIERS non keywords primarily they are used as names
7
LEGALILLEGAL 1.The first character of the identifier should start either with a letter, a currency character ( $ ), or a connecting character like underscore( _ ). 2.The first character maybe followed by either or a combination of letters, currency characters, connection characters, or numbers. 3.There is no limit of how many characters an identifier can contain. However, it's essentially recommended to use a short character identifier yet readable and understandable. 1.Identifiers that starts with a number. 2.Using Java keywords as an identifier is illegal. In other words, you can't use a Java keyword as an identifier Note: More importantly, keep in mind that Java Identifier are case sensitive. Thereby, NAME and name are two different identifiers.
8
Here are some hint on how to formulate identifier name: Classes & Interface - The first letter should be capitalized. If the desired name is composed of several words, the first letter of the inner word should be capitalized (camelCase). For example: Chair, InformationDepartment and HeadOffice. Methods - The first letter should be lowecase, and then camelCase rules should be applied. Also, take note that in method names should be verb-noun pairs. For example: getTotal, setContactNumber and buyCellphone.
9
Here are some hint on how to formulate Identifier name: Variables - same rules apply on letter case with methods. However, it should idially be a short and meaningful. For example: firstName, currentLocation and totalPrice. Constants - Java constants should be named using uppercase letters with underscore characters as separator. Take note that constants are created by marking variables as static and final. For example: PERSON_LABEL, HELLO_MESSAGE and GREETING.
10
LITERALS represent numbers A constant value which can be assigned to a variable E.g: int x=10, int x=010 STRING LITERALS of zero or more characters embedded in double quotes E.g: String s=” laxman scjp”;
11
OPERATORS + and = are used to express basic computation such as addition or String concatenation or assignment.
12
BLOCKS left and right braces ({ and }) body of a class
13
WHITESPACE such as spaces, tabs, and newlines separate tokens
14
COMMENTS /* text */ The compiler ignores everything from /* to */. /** documentation */ This indicates a documentation comment (doc comment, for short). // text The compiler ignores everything from // to the end of the line.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.