Unit 1
Unit 1
with JAVA
Krupali Dave, Assistant Professor
Computer Science & Engineering
UNIT-1
Design introduction
Index
• Object oriented programming,
• OOPS principles
• Encapsulation
• Inheritance and polymorphism java as a oops & Internet enabled language
• Importance of java
• Java usage in industry
• The byte code, compiling
• And running of simple java program,
• Jvm , Jdk , Jre
Object oriented programming
• Java is a programming language and a platform. Java is a high level, robust,
object-oriented and secure programming language.
• Java was developed by Sun Microsystems (which is now the subsidiary of Oracle)
in the year 1995. James Gosling is known as the father of Java. Before Java, its
name was Oak. Since Oak was already a registered company, so James Gosling
and his team changed the name from Oak to Java.
• Platform: Any hardware or software environment in which a program runs, is
known as a platform. Since Java has a runtime environment (JRE) and API, it is
called a platform.
Object oriented programming
• Let's have a quick look at Java programming example. A detailed description of
Hello Java example is available in next page.
• Simple.java
class Simple
{
public static void main(String args[])
{
System.out.println("Hello Java");
}
}
Object oriented programming
• According to Sun, 3 billion devices run Java. There are many devices where Java
is currently used. Some of them are as follows:
• Desktop Applications such as acrobat reader, media player, antivirus, etc.
• Web Applications such as irctc.co.in, javatpoint.com, etc.
1. Enterprise Applications such as banking applications.
2. Mobile
3. Embedded System
4. Smart Card
5. Robotics
6. Games, etc.
Object oriented programming
• Types of JAVA Application:
1. Standalone Application
2. Web Application
3. Enterprise Application
4. Mobile Application
• JAVA Platforms /Edition:
1. Java SE (Java Standard Edition)
2. Java EE (Java Enterprise Edition)
3. Java ME (Java Micro Edition)
4. JavaFX
OOPS principles
• Object-Oriented Programming is a paradigm that provides many concepts,
such as inheritance, data binding, polymorphism, etc.
• The popular object-oriented languages are Java, C#, PHP, Python, C++, etc.
• The main aim of object-oriented programming is to implement real-world entities,
for example, object, classes, abstraction, inheritance, polymorphism, etc.
• Object-Oriented Programming is a methodology or paradigm to design a program
using classes and objects.
OOPS principles
• It simplifies software development and maintenance by providing some concepts:
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
OOPS principles
1. Object: Any entity that has state and behaviour is known as an object. For
example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical.
3. Inheritance: When one object acquires all the properties and behaviours of a
parent object, it is known as inheritance. It provides code reusability. It is used
to achieve runtime polymorphism.
OOPS principles
4. Polymorphism: The word “Polymorphism” derives from two words i.e. “Poly”
which means many and “morphs” meaning forms. Thus polymorphism means many
forms. In a programming language, we can say that an object can take many forms,
and hence the object is polymorphic.
• JRE is an acronym for Java Runtime Environment. It is also written as Java RTE.
The Java Runtime Environment is a set of software tools which are used for
developing Java applications. It is used to provide the runtime environment. It is the
implementation of JVM. It physically exists. It contains a set of libraries + other files
that JVM uses at runtime.
• The implementation of JVM is also actively released by other companies besides Sun
Micro Systems.
JRE:
JDK:
• JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a
software development environment which is used to develop Java applications and
applets. It physically exists. It contains JRE + development tools.
• The JDK contains a private Java Virtual Machine (JVM) and a few other resources
such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a
documentation generator (Javadoc), etc. to complete the development of a Java
Application.
JDK:
www.paruluniversity.ac.
in