1. Declare a class in JAVA
  2. Choose correct name for the class in JAVA
  3. Explain the structure of a class
  4. Define class properties
  5. Define class methods

How to Declare a class in JAVA video tutorial (Hindi)

Vineet Agrawal

Published on December 22, 2016

Syntax of class in JAVA

class class_name{

Basic structure of class

Class contains properties (member variables) and behavior (member function).
The java code given below shows a class with member variables and member functions.

class Employee{
int empID; //member variable
void setInfo(){  //member function with blank body.
This content is part of the following course: 
Frequently Asked Questions
Required Components