DEV Community

Abhishek Avati
Abhishek Avati

Posted on

Java Terminologies

Basic Terminologies

  1. Class : The class is a blueprint of the instance of a class. It is defined as a logical template that share some properties and methods

  2. Object : It is an instance of class, entity that has behavior and state.

  3. Method : The behavior of an object is the method

  4. Instance Variable : Every object has its own unique set of instance variables.

Syntax :

  1. Single line Comment :
// this is a single line comment
Enter fullscreen mode Exit fullscreen mode
  1. Multi line comment:
/* this is 
a multi-line
comment
*/
Enter fullscreen mode Exit fullscreen mode
  1. Documentation Comment
/** Documentation */
Enter fullscreen mode Exit fullscreen mode

Source file name
the name of a source file should exactly match the public class name with the extension of .java
ex: Simple.java

Java is case-sensitive language

Class Names:

  1. the first letter of the class should be in uppercase
  2. If several words are used to form name of class, each inner word's first letter should be in uppercase.

Method Names : all the method names should start with a lowercase letter

Keywords : are the words in a language that are used for some internal process or represents some predefined actions

ex: abstract, boolean, break etc

Top comments (0)