OOPs concepts in Java basic programming language with details - PowerPoint PPT Presentation

About This Presentation
Title:

OOPs concepts in Java basic programming language with details

Description:

Oops conceptes plays vital role in java basic programming language therefore its very important to learn this concepts in details – PowerPoint PPT presentation

Number of Views:552
Slides: 10
Provided by: mishakapoor
Tags: java

less

Transcript and Presenter's Notes

Title: OOPs concepts in Java basic programming language with details


1
  • OOPs concepts in Java basic programming language
    with details

2
  • Index
  • Oops conceptes
  • Object
  • Class
  • Java-Modifier
  • variables
  • Java Arrays
  • Java Enums
  • Inheritance
  • Interface

3
(No Transcript)
4
Oops conceptes Object-objects have States and
behaviour. Example a cat has States-color, name,
Breed as well as behavior such as tail waving,
barking, eating. An object is an instance of a
class. Class-class can be defined as
template/blueprint that describes the
behavior/state the object of its type.method is
basically a behavior. A class can contain many
methods. It is in methods in which the logic is
written, data is manipulated and all actions are
executed.
5
Java-Modifier it is possible to modify classes,
methods etc. with modifiers. There are two
categories of modifiers Access modifiers-
Standard, public, protected, private Non-access
modifiers- final, abstract, strictfp
variables types of variables in Java Local
Variables Class Variables (Static
Variables) Instance variables (Non-static
variables)
6
Java Arrays Arrays are the objects that store
multiple variables of the same type. However, an
array itself is an object on the heap. In the
coming chapters we will examine how to declare,
construct and initialize Java Enums Enums were
introduced in Java 5.0. Enums restrict a variable
to one of only a few predefined values. The
values in this enumerated list are called as
enums. By using enums it is possible to reduce
the number of errors in your code. For example,
if we consider an application for a fresh juice
store, it would be possible to limit the size of
the glass to small, medium and large. This would
ensure that it would not allow anyone to order a
size other than small, medium or large.
7
Inheritance In Java, classes can be derived from
classes. If you need to create a new class and
you already have a class that contains part of
the code you need, you can derive your new class
from the existing code. This concept allows you
to reused the fields and methods of the existing
class without having to rewrite the code in a new
class. In this scenario, the existing class is
called the superclass and the derived class is
the sub class
8
Interface In Java, an interface can be defined as
a contract between objects, how to communicate
with each other. Interfaces play an important
role when it comes to the concept of
inheritance. An interface defines the methods
that should use a derived class (subclass). But
the implementation of the methods is totally up
to the subclass
9
For more details https//www.exltech.in/
Write a Comment
User Comments (0)
About PowerShow.com