Presented by: N.V.RajaSekhar Reddy
www.technolamp.co.in
Want more interesting...
Watch and Like us @ https://www.facebook.com/Technolamp.co.in
subscribe videos @ http://www.youtube.com/user/nvrajasekhar
6. Polymorphism
• Polymorphism gives us the ultimate
flexibility in extensibility. The ability to
define more than one function with the
same name is called Polymorphism.
• In java, c++ there are two type of
polymorphism:
compile time polymorphism (overloading)
runtime polymorphism (overriding).
14. Overloading
• Example of Overloading
int add(int a,int b)
float add(float a,int b)
float add(int a ,float b)
void add(float a)
int add(int a)
void add(int a) //error conflict with
the method int add(int a)
17. Difference Between Java & C++
• In C++,
Method Overloading is an example of Static Polymorphism
Method Overriding is an example of Run time Polymorphism
• In Java, Method overloading and Method overriding
can be achieved using
static methods , final methods,private methods are
examples of Static Polymorphism.
Instance method is an ex of Runtime Polymorphism.
18. Inheritance
• Inheritance is the property which allows a
Child class to inherit some properties from
its parent class.
• In Java this is achieved by using extends
keyword.
• Only properties with access modifier public
and protected can be accessed in child
class.
24. Inheritance
public class Parent
{
public String parentName;
public int parentage;
public String familyName;
}
public class Child extends Parent
{
public String childName;
public int childAge;
public void printMyName()
{
System.out.println(“ My name is “+ chidName+” “ +familyName);
} }
25. Inheritance is the process by which object of one class
acquires the properties of another class.
26. Encapsulation
• Encapsulation means that all data members
(fields) of a class are declared private.
Some methods may be private, too.
• The class interacts with other classes
(called the clients of this class) only
through the class’s constructors and public
methods.
• Constructors and public methods of a class
serve as the interface to class’s clients.
27. Encapsulation
• Encapsulation is the mechanism that binds together code
and the data if manipulates, and keeps both safe from
outside interference and misuse.
• One way to think about encapsulation is as a protective
wrapper that prevents the code and data from being
arbitrarily accessed by other code defined outside the
wrapper.
• Access to the code and data inside the wrapper is tightly
controlled through a well-defined interface. Conclusion:
The wrapping up of data and methods into a single unit
(called class) is known as encapsulation.
28. Abstraction
• Abstraction refers to the act of representing
essential features without including the
background details.
• hiding unnecessary data from the users and
making the application as user friendly then it is
called as abstrcation
ex:Any mail account the user is simply
filling the form and he don't know ho it is
developed.
29. Difference Between Object-based Programming &
Object-Oriented Programming
• Object Based Programming languages obeys all
the features of OOPs except inheritence.
Ex: Java Script,VB script.
• Object Oriented Programming languages obeys
all the features of OOPs.
Ex: C++,Java
31. Simple
• Java is designed to be easy for the
professional programmer to learn and use.
32. Secure
• secure – programs are confined to the Java
execution environment and can not access
other parts of the computer.
33. Secure
• Security problems like eavasdropping,
Tampering and virus threats can be
eliminated or minimized by using java on
internet
34. Portable
• If a program yields the same result on every
machine, then that program is called portable.
Java programs are portable. This is the result of
java’s system independent nature.
35. Object-oriented
• Java is pure Object oriented programming
languages because it is satisfying oops
features.
• Class, object, Abstraction, Inheritance,
polymorphism, Encapsulation.
36. Robust
• Robust means Strong. Java programs are
strong and they don’t crash easily like c
and c++.
why? Excellent Exception handling
Memory Management
Class loader sub system of JVM will
allocate necessary memory for java
program.
Garbage Collector de allocates the
memory
37. Multithreaded
• A thread represents an individual process
to execute a group of statements. JVM uses
several threads to execute different blocks
of code. Creating multiple threads is called
Multi threaded.
38. Compiled and Interpreted
• Java Programs are compiled to generate
byte code.
• This byte code can be downloaded and
interpreted by the interpreter in JVM.
39. High performance
• The problem with the interpreter is slow.
To over come this problem, along with
interpreter java soft people have
introduced JIT (Just In Time) compiler.
• Which enhance the speed of execution.
40. Distributed
• Java is designed for the distributed
environment of the Internet. Because it
handles TCP/IP protocols
• Java supports RMI (Remote Method
Invocation).
• This feature enables a programmer to
invoke methods across the network.
41. Dynamic
• Before the development of java, only static
texts used to be displayed in browser.
• Dynamic loading is possible using applet
programming. Which are dynamically
interacting programs on internet.