• TestingDocs
TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Java Tutorials

Java Tokens

Overview

Java tokens are the smallest elements in the Java program. Java Compiler identifies tokens as the basic building blocks of the program. The compiler breaks program statements into Java tokens.

Java Tokens

Java supports five types of tokens. They are as follows:

  • Keywords
  • Identifiers
  • Literals
  • Operators
  • Separators

Keywords

Keywords are words that have a predefined meaning and purpose in the Java language syntax. We cannot use keywords as variables or identifiers because they already have a predefined meaning in the language syntax.

Identifiers

An identifier is a name given by a programmer to specific programming elements such as variables, methods, classes, etc. To declare an identifier we have to follow some rules.

Literals

A literal is a constant value in Java. Literals are categorized as integer literal, floating-point literal, character literal, string literal, and boolean literal.

Operators

An operator is a symbol that instructs the Java compiler to perform a specific action on one or more operands.

Separators

Separators are the special symbols used to indicate where blocks of code are separated and arranged.  Some of the separators are as follows:

  • Braces {}
  • Parenthesis ()
  • Brackets [ ]
  • Semicolon
  • Comma
  • Period

—

Java Tutorials

Java Tutorial on this website:

https://www.testingdocs.com/java-tutorial/

For more information on Java, visit the official website :

https://www.oracle.com/java/

Related Posts

Java Performance

Java Tutorials /

Improving Java Performance with Multithreading

Download Greenfoot Windows

Java Tutorials /

Download & Install Greenfoot on Windows

Java Tutorials /

Java Static Code Analysis

Java Tutorials /

Java Testing Tools

Java Tutorials /

Handle Multiple Exceptions in Java

‹ Command Line Arguments› Java Assignment Statement

Recent Posts

  • How to secure your SQL Database: Tips and Tricks
  • Shaping the Future of Development: Exploring Key Trends in Software Engineering
  • Improving Java Performance with Multithreading
  • Difference between PHP and JavaScript?
  • Bing Conversation Styles
  • ChatGPT Introduction
  • Open Source AI Frameworks
  • Artificial Intelligence Tools
  • Top AI Music Applications
  • Top AI Website Design Tools

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com