Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
WELCOME
TO THE
PRESENTATION
CLASS & OBJECTS
CLASS
In object-oriented programming , a class is a template definition of the
methods and variables in a particular kind of object . Thus, an object is
a specific instance of a class; it contains real values instead of variables.
The class is one of the defining ideas of object-oriented programming.
What is CLASS?
Access-Specifier Class Class Name
{
{
Class Body/ Segment.
Syntax Of Class
Class Name Rule
First character must be uppercase.
First character of a syllable must be uppercase.
Access-Specifier
public private
protected
public class OurPresentation
{
{
int x,y,z;
void show()
{
{
Example
OBJECT
What is OBJECT?
An object is a member or an "instance" of a class. An object has a
state in which all of its properties have values that you either
explicitly define or that are defined by default settings. This subtle
conceptual difference between classes and objects shows why there
is a tendency to want to use them interchangeably.
Syntax Of Object
ClassName objectName = new ClassName
Here “objectName” is the object of ClassName.
Example
OurPresentation op = new OurPresentation
Here “op” is the object of OurPresentation
THANK YOU

More Related Content

CLASS & OBJECT IN JAVA