SlideShare a Scribd company logo
Class in Java
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Agenda
• Introduction to a Class
• Requirement of a Class
• Elements of a Class
• Defining a Class
• Memory allocation
• Coding standards for Classes
• Access modifiers used for Classes
• Encapsulation
• Example programs for Class creation
• Inner Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Introduction to Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Introduction to Class
• User-defined data type
• Representation of an object-oriented approach
• Process of binding data members and methods in a single unit
• No implementation is possible without classes in java
• Example
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Requirement of a Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Requirement of Class
• Everything is treated as an object in an object-oriented programming language
• The class provides meaning to the objects
• Enhancements become easy
• Maintainability and Modularity will be improved
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Elements of a Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Elements of a class
Classes consist of the following:-
• Methods/Behaviors
They are methods that decides the action/task be performed by
the object
• Variables/Attributes
They are the data members that an object consists of.
• In real scenarios class is represented using a Class diagram created using UML concepts and
software
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Defining a class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Defining a Class
Following is the syntax followed for defining a class in java:-
class <name_of_the_class>
{
//variable declaration
//methods declaration
}
It’s a keyword in java
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Memory Allocation
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Memory Allocation
• Java classes have logical existence
• Defining a class doesn’t allocate memory space.
• Memory space is created only when objects are created.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Coding standards for Classes
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Coding standards for Classes
Some specific coding standards are followed for defining a class in java
1. Starting letter should be in capitals. If the class name consists of more than one word then first
letter of each word should be in capitals (camel case is followed)
2. White spaces are not allowed in the class name
3. Letters, digits, dollar signs, and underscores can be used
4. Choosing a full name in place of cryptic abbreviations is a good programming practice
5. Avoid using java keywords as the name of the class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Coding Concepts related to Classes
• We always run a java class
• For every class, one .class file is created
• The main method of a corresponding class is executed, if the main method is not present it
throws a Runtime error
• Highly recommended to take one class for the source file and the name of the source file and
name of the class should be the same
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Access modifiers used for Classes
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Access modifiers used for classes
The applicable modifiers for top level class are:-
• public
• <default>
• final
• abstract
• strictfp
Inner Class applicable modifiers are :-
• Private
• Protected
• Static
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Access modifiers used for classes
Public:-
If a class is declared public, it can be accessed from anywhere.
Default:-
It is a by default used access specifier in java. If a class is declared default then that class can be
accessed only within that package
Final:-
If a class is declared final, then that class cannot be inherited
Abstract:-
A class is declared as abstract then its instantiation is not possible.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Access modifiers used for classes
Private:-
Only an inner class can be declared private and a private inner class can be accessed only within the
outer class
Protected:-
If an inner class is declared as protected then it can be accessed only within the outer class and its
child class
Static:-
A class cannot be declared as static but for inner classes, it can be used
strictfp:-
A class is declared as strictfp then all its methods should follow IEEE754 standards
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Encapsulation
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Encapsulation
It is the method of encapsulating the functions and data members into a single unit.
Every java class and package is an encapsulated component.
Example:-
class bank
{
String bankName;
void printName()
{
System.out.println(“name of bank is State bank of india”);
}
}
Encapsulated
component
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Question
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Question
• Defining a class in java
 Let’s write a class definition for a student who has his name, roll no, and marks of three subjects.
 The class student should have two methods to calculate the total marks of a student and get the
grades
• Accessing the defined methods and variables
 Create an object of the class to call the methods and access the data members inside the main
method
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inner Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inner Class
• It’s a way to declare a class inside another class
• When there is no chance of a existence of an object without an existence of another object then we
use the inner class concept.
• The relationship between outer and inner class is a has-a relationship
Example:-
Without Bank there can’t be a Account. So,
class Bank
{
class Account
{
}
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inner Class
• Inside inner class, static member should not be declared.
• How will .class file be created and executed for these inner classes?
class Bank
{
class Account
{
}
public static void main(String[] args)
{
System.out.println(“account created”);
}
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inner Class
Accessing Inner class from the static area of outer class.
public class Bank
{
class Account
{
public void printAccountName()
{
System.out.println(“Bank account name is abcd”);
}
}
public static void main(String[] args)
{
Bank b = new Bank();
Bank.Account a = b.new Bank();
a.printAccountName();
} } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inner Class
Accessing Inner class from the instance area of outer class.
public class Bank
{
class Account
{
public void printAccountName()
{
System.out.println(“Bank account name is abcd”);
}
}
public void callingMethod()
{
Account a = new Account();
a.printAccountName();
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Continued…
public static void main(String[] args)
{
Bank b = new Bank();
b.callingMethod();
}
}
• Nesting of the inner class is also possible
Class A
{
class B
{
class C
{ //codes and functionalities
}
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Anonymous inner class
• For one-time usage of an inner class, we create an anonymous inner class.
• It’s an inner class without a name
• There are 3 types of anonymous inner class
• Anonymous inner class that extends a class
• Anonymous inner class that implements an interface
• Anonymous inner class that is defined inside arguments
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Anonymous inner class that extends a class
public class Bank
{
public void printAccountName()
{
System.out.println(“Bank account name is abcd”);
}
class Account
{
public static void main(String[] args)
{
Bank b1 = new Bank()
{
public void printAccountName()
{
System.out.println(“Bank account name is xyz”);
}
};
b1.printAccountName();
Bank b2 = new Bank();
b2.printAccountName();
}
}
Inner
class
definition
Calling the methods
defined inside inner
class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Summary
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Summary
Discussed the following topics:-
1. What is a class and how to define a class in java
2. The different coding guidelines and standards to be followed for
classes in java
3. Different access modifiers suitable for classes at different levels
4. Class is the best example to implement encapsulation
5. The complete concept of inner classes and it’s implementations
6. Examples related to classes.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited

More Related Content

Similar to Classes in Java great learning.pdf (20)

PPTX
Core java oop
Parth Shah
 
PPT
Ap Power Point Chpt4
dplunkett
 
PPTX
Presentation on class and object in Object Oriented programming.
Enam Khan
 
PPTX
Nested classes in java
ChiradipBhattacharya
 
PPTX
Unit3 part1-class
DevaKumari Vijay
 
PDF
Lecture2.pdf
SakhilejasonMsibi
 
PPTX
Javasession8
Rajeev Kumar
 
DOCX
Nested classes in java
Richa Singh
 
PPTX
PPT Lecture-1.4.pptx
HimanshuPandey957216
 
PPTX
Simple class and object examples in java
Harish Gyanani
 
PPTX
Imp Key.pptx very easy to learn go for it
dwivedyp
 
PPTX
Inner class
Bansari Shah
 
PPT
encapsulation and abstraction
ALIZAPARVIN
 
PPT
Java căn bản - Chapter4
Vince Vo
 
PPT
Chapter 4 - Defining Your Own Classes - Part I
Eduardo Bergavera
 
PDF
Object Oriented Programming - 5. Class & Object
AndiNurkholis1
 
PPTX
UNIT - IIInew.pptx
akila m
 
PPTX
Java Programs
vvpadhu
 
Core java oop
Parth Shah
 
Ap Power Point Chpt4
dplunkett
 
Presentation on class and object in Object Oriented programming.
Enam Khan
 
Nested classes in java
ChiradipBhattacharya
 
Unit3 part1-class
DevaKumari Vijay
 
Lecture2.pdf
SakhilejasonMsibi
 
Javasession8
Rajeev Kumar
 
Nested classes in java
Richa Singh
 
PPT Lecture-1.4.pptx
HimanshuPandey957216
 
Simple class and object examples in java
Harish Gyanani
 
Imp Key.pptx very easy to learn go for it
dwivedyp
 
Inner class
Bansari Shah
 
encapsulation and abstraction
ALIZAPARVIN
 
Java căn bản - Chapter4
Vince Vo
 
Chapter 4 - Defining Your Own Classes - Part I
Eduardo Bergavera
 
Object Oriented Programming - 5. Class & Object
AndiNurkholis1
 
UNIT - IIInew.pptx
akila m
 
Java Programs
vvpadhu
 

More from SHASHIKANT346021 (8)

PPTX
Civil Engineering Departmental PPT 1.pptx
SHASHIKANT346021
 
PPTX
Electronics and Computer Engineering PPT.pptx
SHASHIKANT346021
 
PPTX
Introducing-the-Python-Interpreter. What is Python Interpreter
SHASHIKANT346021
 
PPTX
Course Presentation: Electronic & Computer Engineering
SHASHIKANT346021
 
PPT
Parallel Programming Models: Shared variable model, Message passing model, Da...
SHASHIKANT346021
 
PPTX
Parallel Programming Models: Shared variable model
SHASHIKANT346021
 
PDF
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
SHASHIKANT346021
 
PDF
LECTURE 3 LOOPS, ARRAYS.pdf
SHASHIKANT346021
 
Civil Engineering Departmental PPT 1.pptx
SHASHIKANT346021
 
Electronics and Computer Engineering PPT.pptx
SHASHIKANT346021
 
Introducing-the-Python-Interpreter. What is Python Interpreter
SHASHIKANT346021
 
Course Presentation: Electronic & Computer Engineering
SHASHIKANT346021
 
Parallel Programming Models: Shared variable model, Message passing model, Da...
SHASHIKANT346021
 
Parallel Programming Models: Shared variable model
SHASHIKANT346021
 
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
SHASHIKANT346021
 
LECTURE 3 LOOPS, ARRAYS.pdf
SHASHIKANT346021
 
Ad

Recently uploaded (20)

DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Ad

Classes in Java great learning.pdf

  • 1. Class in Java Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 2. Agenda • Introduction to a Class • Requirement of a Class • Elements of a Class • Defining a Class • Memory allocation • Coding standards for Classes • Access modifiers used for Classes • Encapsulation • Example programs for Class creation • Inner Class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 3. Introduction to Class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 4. Introduction to Class • User-defined data type • Representation of an object-oriented approach • Process of binding data members and methods in a single unit • No implementation is possible without classes in java • Example Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 5. Requirement of a Class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 6. Requirement of Class • Everything is treated as an object in an object-oriented programming language • The class provides meaning to the objects • Enhancements become easy • Maintainability and Modularity will be improved Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 7. Elements of a Class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 8. Elements of a class Classes consist of the following:- • Methods/Behaviors They are methods that decides the action/task be performed by the object • Variables/Attributes They are the data members that an object consists of. • In real scenarios class is represented using a Class diagram created using UML concepts and software Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 9. Defining a class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 10. Defining a Class Following is the syntax followed for defining a class in java:- class <name_of_the_class> { //variable declaration //methods declaration } It’s a keyword in java Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 11. Memory Allocation Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 12. Memory Allocation • Java classes have logical existence • Defining a class doesn’t allocate memory space. • Memory space is created only when objects are created. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 13. Coding standards for Classes Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 14. Coding standards for Classes Some specific coding standards are followed for defining a class in java 1. Starting letter should be in capitals. If the class name consists of more than one word then first letter of each word should be in capitals (camel case is followed) 2. White spaces are not allowed in the class name 3. Letters, digits, dollar signs, and underscores can be used 4. Choosing a full name in place of cryptic abbreviations is a good programming practice 5. Avoid using java keywords as the name of the class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 15. Coding Concepts related to Classes • We always run a java class • For every class, one .class file is created • The main method of a corresponding class is executed, if the main method is not present it throws a Runtime error • Highly recommended to take one class for the source file and the name of the source file and name of the class should be the same Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 16. Access modifiers used for Classes Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 17. Access modifiers used for classes The applicable modifiers for top level class are:- • public • <default> • final • abstract • strictfp Inner Class applicable modifiers are :- • Private • Protected • Static Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 18. Access modifiers used for classes Public:- If a class is declared public, it can be accessed from anywhere. Default:- It is a by default used access specifier in java. If a class is declared default then that class can be accessed only within that package Final:- If a class is declared final, then that class cannot be inherited Abstract:- A class is declared as abstract then its instantiation is not possible. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 19. Access modifiers used for classes Private:- Only an inner class can be declared private and a private inner class can be accessed only within the outer class Protected:- If an inner class is declared as protected then it can be accessed only within the outer class and its child class Static:- A class cannot be declared as static but for inner classes, it can be used strictfp:- A class is declared as strictfp then all its methods should follow IEEE754 standards Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 20. Encapsulation Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 21. Encapsulation It is the method of encapsulating the functions and data members into a single unit. Every java class and package is an encapsulated component. Example:- class bank { String bankName; void printName() { System.out.println(“name of bank is State bank of india”); } } Encapsulated component Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 22. Question Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 23. Question • Defining a class in java  Let’s write a class definition for a student who has his name, roll no, and marks of three subjects.  The class student should have two methods to calculate the total marks of a student and get the grades • Accessing the defined methods and variables  Create an object of the class to call the methods and access the data members inside the main method Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 24. Inner Class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 25. Inner Class • It’s a way to declare a class inside another class • When there is no chance of a existence of an object without an existence of another object then we use the inner class concept. • The relationship between outer and inner class is a has-a relationship Example:- Without Bank there can’t be a Account. So, class Bank { class Account { } } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 26. Inner Class • Inside inner class, static member should not be declared. • How will .class file be created and executed for these inner classes? class Bank { class Account { } public static void main(String[] args) { System.out.println(“account created”); } } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 27. Inner Class Accessing Inner class from the static area of outer class. public class Bank { class Account { public void printAccountName() { System.out.println(“Bank account name is abcd”); } } public static void main(String[] args) { Bank b = new Bank(); Bank.Account a = b.new Bank(); a.printAccountName(); } } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 28. Inner Class Accessing Inner class from the instance area of outer class. public class Bank { class Account { public void printAccountName() { System.out.println(“Bank account name is abcd”); } } public void callingMethod() { Account a = new Account(); a.printAccountName(); } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 29. Continued… public static void main(String[] args) { Bank b = new Bank(); b.callingMethod(); } } • Nesting of the inner class is also possible Class A { class B { class C { //codes and functionalities } } Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 30. Anonymous inner class • For one-time usage of an inner class, we create an anonymous inner class. • It’s an inner class without a name • There are 3 types of anonymous inner class • Anonymous inner class that extends a class • Anonymous inner class that implements an interface • Anonymous inner class that is defined inside arguments Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 31. Anonymous inner class that extends a class public class Bank { public void printAccountName() { System.out.println(“Bank account name is abcd”); } class Account { public static void main(String[] args) { Bank b1 = new Bank() { public void printAccountName() { System.out.println(“Bank account name is xyz”); } }; b1.printAccountName(); Bank b2 = new Bank(); b2.printAccountName(); } } Inner class definition Calling the methods defined inside inner class Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 32. Summary Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
  • 33. Summary Discussed the following topics:- 1. What is a class and how to define a class in java 2. The different coding guidelines and standards to be followed for classes in java 3. Different access modifiers suitable for classes at different levels 4. Class is the best example to implement encapsulation 5. The complete concept of inner classes and it’s implementations 6. Examples related to classes. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited