2. INTRODUCTION
• Overview of Java.
• Object Oriented Programming Concept(OOP in Java)
• Exception Handling in Java
• Applet in Java
• Servlet
• JSP in Java
• JDBC in Java
• Security in Java
3. Overview of Java
What is Java
Java is a programming language and a platform .It developed by Games
Gosling in 1991 at Sun micro-system.
Java is a high level, robust, object-oriented and secure programming language.
Java Example
class Simple{
public static void main(String args[]){
System.out.println("Hello Java");
}
}
4. • Application
According to Sun, 3 billion devices run Java. There are many devices where Java is currently used.
Desktop Applications Web Applications
Enterprise Applications Mobile App
Embedded System Smart Card
Robotics Games, etc.
• Features of Java
Simple Object – oriented
Portable Platform Independent
Robust Architecture neutral
Interpreted High Performance
Multi threated Distributed
Dynamic Secured
7. Inheritance in Java
• Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a
parent object.
• The idea behind inheritance in Java is that you can create new classes that are built upon existing classes
• Types of inheritance in java
1. Single
2. Multilevel
3. Hierarchical
4. Multiple
5. Hybrid
8. Polymorphism in Java
Polymorphism in Java is a concept by which we can perform a single action in different ways.
There are two types of polymorphism in Java:
Compile-time polymorphism
Runtime polymorphism.
Encapsulation in java
Encapsulation in Java is a process of wrapping code and data together into a single unit.
We can create a fully encapsulated class in Java by making all the data members of the class
private.
Advantage of Encapsulation in Java
Control over data Data Hiding.
Easy and fast to create an encapsulated class in Java. Easy to Test.
9. Abstraction in java
Abstraction is a process of hiding the implementation details and showing only functionality to the user.
• There are two ways to achieve abstraction in java
• Abstract class (0 to 100%)
• Interface (100%)
Packages in java
• A java package is a group of similar types of
classes, interfaces and sub-packages.
• Package in java can be categorized in two form
Built-in package ex. java.util, java.lang etc
User-defined package.
10. Exception Handling in Java
• The Exception Handling in Java is one of the powerful mechanism to handle the runtime errors
so that normal flow of the application can be maintained.
Java Exception Keywords
11. Java Applet
• Applet is a special type of program that is embedded in the webpage to generate the dynamic
content. It runs inside the browser and works at client side.
Advantage of Applet
• It works at client side so less response time.
• Secured
• It can be executed by browsers running under many plateforms, including Linux, Windows,
Mac Os etc.
Lifecycle of Applet
• Applet is initialized.
• Applet is started.
• Applet is painted.
• Applet is stopped.
• Applet is destroyed.
12. Servlets
• Servlet technology is used to create a web application (dynamic web).
• Advantages of Servlet over CGI
Performance Robust
Secure Portability
Life Cycle of a Servlet
• Servlet class is loaded.
• Servlet instance is created.
• init method is invoked.
• service method is invoked.
• destroy method is invoked.
13. JSP (Java Servlet Page)
• JSP technology is used to create web application just like Servlet technology
• A JSP page consists of HTML tags and JSP tags. The JSP pages are easier to maintain than Servlet
because we can separate designing and development.
• Advantage of JSP over Servlet
Extension to Servlet Easy to maintain
Less code than Servlet No need to recompile
• JSP Scripting elements
The scripting elements provides the ability to insert java code inside the JSP.
Scriptlet tag used to execute java source code in JSP
Declaration tag used to declare fields and methods.
Expression tag used to print the values of variable or method
14. JDBC(Java Database Connectivity)
• We can use JDBC API to access tabular data stored in any relational database. By the help of JDBC API,
we can save, update, delete and fetch data from the database.
• There are four types of JDBC drivers:
• JDBC-ODBC Bridge Driver,
• Native Driver,
• Network Protocol Driver, and
• Thin Driver
• Java Database Connectivity with 5 Steps
• Register the Driver class
• Create connection
• Create statement
• Execute queries
• Close connection
15. Java Security
• java.security package provide a brief management of security concern . It have
AccessControlContext , AllPermission , Permission , more classes.
• Static Data Typing: Java is a statically typed language, which reduces the possibilities of run-time
detection of type-related errors
• Access Modifiers: Java allows us to use different access modifiers like public and private to
control access to fields, methods, and classes
• Automatic Memory Management: Java has garbage-collection based memory management,
which frees developers from managing this manually
• Bytecode Verification: Java is a compiled language, which means it converts code into platform-
agnostic bytecode, and runtime verifies every bytecode it loads for execution
Java Cryptography
• The Java Cryptographic Architecture (JCA) provides a framework to access and implement
cryptographic functionalities in Java, including:
Digital signatures Message digests
Symmetric and asymmetric ciphers Message authentication codes
Key generators and key factories
16. Project
• We practice multiple small program and creating web
page like Biodata form , Resume Form ,Desktop
Application etc.
• Mini Project Online management System in JSP.
• Another a small Online product Sale Website.