0% found this document useful (0 votes)
23 views

1.basic Concepts in Java

This document provides an overview of key concepts in object-oriented programming and Java, including classes, objects, attributes, methods, constructors, packages, encapsulation, abstraction, inheritance, polymorphism, and interfaces. It defines classes as blueprints for objects, and objects as instances of classes with a state, behavior, and identity. It also describes methods as describing an object's behavior, attributes as storing an object's data, and constructors as initializing new objects.

Uploaded by

Irish Amaro
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

1.basic Concepts in Java

This document provides an overview of key concepts in object-oriented programming and Java, including classes, objects, attributes, methods, constructors, packages, encapsulation, abstraction, inheritance, polymorphism, and interfaces. It defines classes as blueprints for objects, and objects as instances of classes with a state, behavior, and identity. It also describes methods as describing an object's behavior, attributes as storing an object's data, and constructors as initializing new objects.

Uploaded by

Irish Amaro
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

BASIC CONCEPTS IN

JAVA
Object-Oriented Design
◦ Object-oriented design is a technique that focuses design
on objects and classes based on real world scenarios. It
emphasizes state, behavior and interaction of objects. It
provides the benefits of faster development, increased
quality, easier maintenance, enhanced modifiability and
increase software reuse
Class
◦A class allows you to define new data
types. It serves as a blueprint, which is a
model for the objects you create based on
this new data type.
Object
◦ An object is an entity that has a state, behavior and
identity with a well-defined role in problem space. It
is an actual instance of a class. Thus, it is also
known as an instance. It is created every time you
instantiate a class using the new keyword.
Attribute
◦An attribute refers to the data element of
an object. It stores information about the
object. It is also known as a data member,
an instance variable, a property or a data
field.
Method
◦A method describes the
behavior of an object. It is also
called a function or a
procedure.
Constructor
◦A constructor is a special type of
method used for creating and
initializing a new object. Remember
that constructors are not members
Package
◦A package refers to a grouping of
classes and/or subpackages. Its
structure is analogous to that of a
directory.
Encapsulation
◦Encapsulation refers to the principle of
hiding design or implementation
information that are not relevant to
the current object
Abstraction
◦While encapsulation is hiding the details
away, abstraction refers to ignoring aspects
of a subject that are not relevant to the
current purpose in order to concentrate
more fully on those that are.
Inheritance
◦ Inheritance is a relationship between classes wherein
one class is the superclass or the parent class of
another. It refers to the properties and behaviors
received from an ancestor. It is also know as a "is-a"
relationship. Consider the following hierarchy
Polymorphism
◦Polymorphism is the ability of an
object to assume may different forms.
Literally, "poly" means many while
"morph" means form.
Interface
◦An interface is a contract in the form of a
collection of method and constant
declarations. When a class implements an
interface, it promises to implement all of
the methods declared in that interface.

You might also like