Define the various TOKENS of JAVA.
Advertisements
प्रश्न
Define the various TOKENS of JAVA.
व्याख्या
Advertisements
उत्तर
- Keywords: Keywords are reserved words that have predefined meanings in Java. They cannot be used as names of variables, classes or methods.
Examples:int,float,class,public,if,else. - Identifiers: Identifiers are user-defined names given to variables, classes, methods and other elements of a Java program.
Examples:student,totalMarks,sum,display. - Literals: Literals are fixed or constant values that are directly used in a Java program. They may represent numbers, characters, strings or Boolean values.
Examples:100,25.5,'A',"Java",true. - Operators: Operators are special symbols used to perform arithmetic, relational, logical and other operations on variables and values.
Examples:+,-,*,/,%,==,&&,||. - Separators: Separators are special symbols used to separate or group different elements of a Java program.
Examples: Parentheses( ), braces{ }, brackets[ ], semicolon;, comma,and period..
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
