SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Java Programming and
Security
UMESHCHANDRA YADAV ( 1783910909 )
DHIRAJ GUPTA ( 1783910903 )
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
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");
}
}
• 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
Oops Concept
Class
Object
Inheritance
Polymorphism
Abstraction
Encapsulation
An entity that has state and behavior is
known as an object.
A class is a group of objects which have
common properties. It is a blueprint from
which objects are created.
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
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.
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.
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
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.
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.
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
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
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
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.
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

The Real Thing: Java Virtual Machine
The Real Thing: Java Virtual MachineThe Real Thing: Java Virtual Machine
The Real Thing: Java Virtual MachineFrontech
 
Java and Java platforms
Java and Java platformsJava and Java platforms
Java and Java platformsIlio Catallo
 
Advanced java
Advanced java Advanced java
Advanced java NA
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming Saravanakumar R
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)Jadavsejal
 
Advantages of java
Advantages of javaAdvantages of java
Advantages of javaxxx007008
 
Java introduction
Java introductionJava introduction
Java introductionSagar Verma
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentalsOm Ganesh
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
Security Architecture of the Java platform
Security Architecture of the Java platformSecurity Architecture of the Java platform
Security Architecture of the Java platformMartin Toshev
 
A begineers guide of JAVA - Getting Started
 A begineers guide of JAVA - Getting Started A begineers guide of JAVA - Getting Started
A begineers guide of JAVA - Getting StartedRakesh Madugula
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENTjosemachoco
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvmhome
 

Was ist angesagt? (20)

The Real Thing: Java Virtual Machine
The Real Thing: Java Virtual MachineThe Real Thing: Java Virtual Machine
The Real Thing: Java Virtual Machine
 
Java and Java platforms
Java and Java platformsJava and Java platforms
Java and Java platforms
 
Advanced java
Advanced java Advanced java
Advanced java
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)
 
Advantages of java
Advantages of javaAdvantages of java
Advantages of java
 
Java-java virtual machine
Java-java virtual machineJava-java virtual machine
Java-java virtual machine
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Security Architecture of the Java platform
Security Architecture of the Java platformSecurity Architecture of the Java platform
Security Architecture of the Java platform
 
1 java introduction
1 java introduction1 java introduction
1 java introduction
 
JVM
JVMJVM
JVM
 
A begineers guide of JAVA - Getting Started
 A begineers guide of JAVA - Getting Started A begineers guide of JAVA - Getting Started
A begineers guide of JAVA - Getting Started
 
Lec 3 01_aug13
Lec 3 01_aug13Lec 3 01_aug13
Lec 3 01_aug13
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
History of java'
History of java'History of java'
History of java'
 

Ähnlich wie Java programming and security

Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentationdhananajay95
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf10322210023
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to JavaSoumya Suman
 
Java unit1 a- History of Java to string
Java unit1 a- History of Java to stringJava unit1 a- History of Java to string
Java unit1 a- History of Java to stringSivaSankari36
 
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Sagar Verma
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdprat0ham
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxMurugesh33
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxMurugesh33
 
Java Programming concept
Java Programming concept Java Programming concept
Java Programming concept Prakash Poudel
 
JAVA-History-buzzwords-JVM_architecture.pptx
JAVA-History-buzzwords-JVM_architecture.pptxJAVA-History-buzzwords-JVM_architecture.pptx
JAVA-History-buzzwords-JVM_architecture.pptx20EUEE018DEEPAKM
 
Presentation on java
Presentation on javaPresentation on java
Presentation on javawilliam john
 

Ähnlich wie Java programming and security (20)

Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentation
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
1 java intro
1 java intro1 java intro
1 java intro
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Java unit1 a- History of Java to string
Java unit1 a- History of Java to stringJava unit1 a- History of Java to string
Java unit1 a- History of Java to string
 
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
Java Programming concept
Java Programming concept Java Programming concept
Java Programming concept
 
Letest
LetestLetest
Letest
 
Getting Started with JAVA
Getting Started with JAVAGetting Started with JAVA
Getting Started with JAVA
 
Features of java 02
Features of java 02Features of java 02
Features of java 02
 
JAVA-History-buzzwords-JVM_architecture.pptx
JAVA-History-buzzwords-JVM_architecture.pptxJAVA-History-buzzwords-JVM_architecture.pptx
JAVA-History-buzzwords-JVM_architecture.pptx
 
Presentation on java
Presentation on javaPresentation on java
Presentation on java
 

Kürzlich hochgeladen

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 

Kürzlich hochgeladen (20)

Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 

Java programming and security

  • 1. Java Programming and Security UMESHCHANDRA YADAV ( 1783910909 ) DHIRAJ GUPTA ( 1783910903 )
  • 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
  • 5.
  • 6. Oops Concept Class Object Inheritance Polymorphism Abstraction Encapsulation An entity that has state and behavior is known as an object. A class is a group of objects which have common properties. It is a blueprint from which objects are created.
  • 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.