SlideShare a Scribd company logo
A Brief Introduction…
Submitted by-
Dilip Kumar Jangir
Branch-Information Technology
Roll No.-12EARIT019
What is Java?
 Java is a general purpose, high-level programming language developed
by Sun Microsystems.
 A small team of engineers, known as the Green Team, initiated the
language in 1991.
 Java was originally called OAK, and was designed for handheld devices
and set-top boxes.
 Today, Java is a commonly used foundation for developing and delivering
content on the Web.
Characteristics of Java
Java is-
 Simple.
 Object-oriented.
 Distributed.
 Interpreted.
 Robust.
 Secure.
 Architecture-neutral.
 Portable.
 Multithreaded.
 Dynamic.
Java Virtual Machine(JVM)
 Java is both compiled and interpreted.
 Source code is compiled into Java bytecode.
 Which is then interpreted by the Java Virtual Machine (JVM).
 Therefore bytecode is machine code for the JVM.
 Java bytecode can run on any JVM, on any platform including mobile
phones and other hand-held devices.
 Networking and distribution are core features.
 Makes Java very good for building networked applications, server side components,
 In other languages these are additional APIs.
Features of JVM
 The Garbage Collector
 Runs in the background and cleans up memory while application is running.
 Java manages memory for you, the developer has no control over the allocation of
memory (unlike in C/C++).
 This is much simpler and more robust (no chance of memory leaks or corruption).
 The Just In Time compiler (JIT)
 Also known as “Hot Spot”.
 Continually optimises running code to improve performance.
 Can approach the speed of C++ even though its interpreted.
(Cont.)Features of JVM
 Security
 Java offers very fine control over what an application is allowed to do.
 E.g. Read/write files, open sockets to remote machines, discover information about the
users environment, etc.
 Used in Java Applets to create a “sandbox”. Stops a rogue applet attacking your machine.
 Makes Java very safe, an important feature in distributed systems.
 Class Loading
 Loading of bytecode into the virtual machine for execution.
 Code can be read from a local disk, over a network, or the Internet.
 Allows downloading of applications and applets on the fly.
Versions of Java
 JDK Alpha and Beta(1995)
 JDK 1.0(January 23,1996)
 JDK 1.1(February 19,1997)
 J2SE 1.2(December 8,1998)
 J2SE 1.3(May 8,2000)
 J2SE 1.4(February 6,2002)
 J2SE 5.0(September 30,2004)
 J2SE 6.0(December 11,2006)
 J2SE 7.0(July 28,2011)
 J2SE 8.0(March 18,2014)
 J2SE 9.0 & 10.0 are scheduled to release in 2016 & 2018 respectively.
Data Types
In Java, there are two categories of data types-
1. Primitive Data Types 2. Non-Primitive Data Types
Data Type Default Type Default Size
boolean False 1 bit
char ‘u0000’ 2 byte
byte 0 1 byte
short 0 2 byte
int 0 4 byte
long 0L 8 byte
float 0.0f 4 byte
double 0.0d 8 byte
Naming Conventions
Java Naming Convention is a rule to follow as you decide what to name your
identifiers such as class, package, variable, constant, method, etc.
Name Conventions
Class Name Should start with uppercase letter and be a noun e.g. String,
Colour, Button, Thread, etc.
Interface Name Should start with uppercase letter and be an adjective e.g.
Runnable, ActionListener, etc.
Method Name Should start with lowercase letter and be a verb e.g.
actionPerformed(), main), println(), etc.
Variable Name Should start with lowercase letter e.g. forstName, orderNumber,
etc.
Package Name Should be in lowercase letter e.g. java, lang, sql,util, etc.
Constant Name Should be in uppercase letter e.g. RED, YELLOW,
etc.
Java OOP’s Concept
 Object Oriented Programming is a paradigm that provides many
concepts such as inheritance, data binding, polymorphism etc.
 Java concepts-
 Object
 Class
 Inheritance
 Polymorphism
 Abstraction
 Encapsulation
Object
 An entity that has state and behavior is known as an object e.g. chair,
bike, marker, pen, table, car etc.
 An object has three characteristics:
 State- represents data(value) of an object.
 Behaviour- represents the behaviour (functionality) of an object such
as deposit, withdraw, etc.
 Identity- Object identity is typically implemented via a unique ID. The
value of the ID is not visible to the external user but, it is used
internally by the JVM to identify each object uniquely.
 Object is an instance of a class.
Class
 A class is a group of objects that has common properties. It is a template
or blueprint from which objects are created.
 A class in java can contain-
 Data member
 Method
 Constructor
 Block
 Class and interface
 By default, all data members and methods are private in Java.
Example of Class
class Student{
int age;
String name;
void printData(){
System.out.println(“Name:”+name+”nAge:”+age);
}
public static void main(String args[]){
Student st=new Student();
st.name=“John”;
st.age=22;
st.printData();
}
}
Inheritance
 Inheritance in java is a mechanism in which one object acquires all the
properties and behaviors of parent object.
 The idea behind inheritance in java is that you can create new classes
that are built upon existing classes.
 Inheritance represents the IS-A relationship, also known as parent-
child relationship.
 It provides the mechanism of usability of code.
 The extends keyword is used to derive a new class from existing class.
Types of Inheritance
 Single
 Multilevel
 Hierarchical
 Java does not support Multiple Inheritance because it creates the
ambiguity in the program.
Polymorphism
 Polymorphism in java is a concept by which we can perform a single action by
different ways. Polymorphism is derived from 2 greek words: poly and morphs.
 The word "poly" means many and "morphs" means forms. So polymorphism
means many forms.
 There are two types of polymorphism in java:
 Compiletime Polymorphism
 Runtime Polymorphism
 We can perform polymorphism in java by method overloading and method
overriding.
Method Overloading
 If a class have multiple methods by same name but different parameters,
it is known as Method Overloading.
 Method overloading increases the readability of the program.
 There are two ways to overload the method in java:
 By changing number of arguments.
 By changing the data types.
Method Overriding
 If subclass (child class) has the same method as declared in the parent
class, it is known as method overriding in java.
 Usages-
 Method overriding is used to provide specific implementation of a
method that is already provided by its super class.
 Method overriding is used for runtime polymorphism
 Rules-
 method must have same name as in the parent class
 method must have same parameter as in the parent class.
 must be IS-A relationship (inheritance).
Abstraction
 Abstraction is a process of hiding the implementation details and
showing only functionality to the user.
 Another way, it shows only important things to the user and hides the
internal details.
 For example sending SMS, you just type the text and send the message.
You don't know the internal processing about the message delivery.
 Abstraction lets you focus on what the object does instead of how it does
it.
Encapsulation
 Encapsulation in java is a process of wrapping code and data together
into a single unit, for example capsule i.e. mixed of several medicines.
 We can create a fully encapsulated class in java by making all the data
members of the class private.
 Advantages:
 By providing only setter or getter method, you can make the
class read-only or write-only.
 It provides you the control over the data.
 The Java Bean class is the example of fully encapsulated class.
MySQL
 The most popular Open Source Relational SQL database management system.
 One of the best RDBMS being used for developing web-based software
applications.
 Uses a standard form of the well-known SQL data language, works on many
operating systems and with many languages including PHP, PERL, C, C++, JAVA,
etc.
Online Exam
System
Java PPT
Java PPT
Java PPT

More Related Content

PPTX
OOPS In JAVA.pptx
PDF
java ppt.pdf
PPTX
Basics of JAVA programming
PPT
Jsp ppt
PDF
Oops concepts || Object Oriented Programming Concepts in Java
PPTX
C# Framework class library
PPTX
Interface in java
PPTX
Introduction to java
OOPS In JAVA.pptx
java ppt.pdf
Basics of JAVA programming
Jsp ppt
Oops concepts || Object Oriented Programming Concepts in Java
C# Framework class library
Interface in java
Introduction to java

What's hot (20)

PPT
Jdbc ppt
PPTX
Abstraction in java
PDF
Basics of JavaScript
PPTX
Introduction to EJB
PPTX
OOP Unit 1 - Foundation of Object- Oriented Programming
PDF
Java Presentation For Syntax
PDF
Java: The Complete Reference, Eleventh Edition
PDF
Java Basic Oops Concept
PPTX
Lecture - 2 Environment setup & JDK, JRE, JVM
PPTX
Access modifiers in java
PPT
Java Programming for Designers
PPT
Exception Handling in JAVA
PPT
Java Servlets
PPT
javaScript.ppt
PPTX
Operating system architecture
PPSX
Introduction to Java
PDF
JavaScript Programming
PPTX
Core java complete ppt(note)
PPSX
Introduction of java
Jdbc ppt
Abstraction in java
Basics of JavaScript
Introduction to EJB
OOP Unit 1 - Foundation of Object- Oriented Programming
Java Presentation For Syntax
Java: The Complete Reference, Eleventh Edition
Java Basic Oops Concept
Lecture - 2 Environment setup & JDK, JRE, JVM
Access modifiers in java
Java Programming for Designers
Exception Handling in JAVA
Java Servlets
javaScript.ppt
Operating system architecture
Introduction to Java
JavaScript Programming
Core java complete ppt(note)
Introduction of java
Ad

Similar to Java PPT (20)

PPTX
Java Programming - UNIT - 1, Basics OOPS, Differences
ODP
Basic of Java
PPTX
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
PDF
Cs8392 oops 5 units notes
PPTX
U1 JAVA.pptx
PPT
Java_notes.ppt
PPTX
1 Introduction to JAVA.pptx
PDF
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
PPTX
Android Training (Java Review)
PPT
Java OOP s concepts and buzzwords
PPTX
PPTX
Java Programming concept
PDF
Java notes
PPTX
Introduction to oop and java fundamentals
PPTX
Java Technologies notes of unit 1 and 2.
PDF
Java training materials for computer engineering.pdf
PPTX
Unit 1 – Introduction to Java- (Shilpa R).pptx
PPTX
Presentation5
PPTX
Object Oriented Programming Tutorial.pptx
PPT
Object oriented programming_Unit1_Introduction.ppt
Java Programming - UNIT - 1, Basics OOPS, Differences
Basic of Java
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Cs8392 oops 5 units notes
U1 JAVA.pptx
Java_notes.ppt
1 Introduction to JAVA.pptx
Lectupopplkmkmkkpompom-0ookoimmire 2.pdf
Android Training (Java Review)
Java OOP s concepts and buzzwords
Java Programming concept
Java notes
Introduction to oop and java fundamentals
Java Technologies notes of unit 1 and 2.
Java training materials for computer engineering.pdf
Unit 1 – Introduction to Java- (Shilpa R).pptx
Presentation5
Object Oriented Programming Tutorial.pptx
Object oriented programming_Unit1_Introduction.ppt
Ad

Java PPT

  • 1. A Brief Introduction… Submitted by- Dilip Kumar Jangir Branch-Information Technology Roll No.-12EARIT019
  • 2. What is Java?  Java is a general purpose, high-level programming language developed by Sun Microsystems.  A small team of engineers, known as the Green Team, initiated the language in 1991.  Java was originally called OAK, and was designed for handheld devices and set-top boxes.  Today, Java is a commonly used foundation for developing and delivering content on the Web.
  • 3. Characteristics of Java Java is-  Simple.  Object-oriented.  Distributed.  Interpreted.  Robust.  Secure.  Architecture-neutral.  Portable.  Multithreaded.  Dynamic.
  • 4. Java Virtual Machine(JVM)  Java is both compiled and interpreted.  Source code is compiled into Java bytecode.  Which is then interpreted by the Java Virtual Machine (JVM).  Therefore bytecode is machine code for the JVM.  Java bytecode can run on any JVM, on any platform including mobile phones and other hand-held devices.  Networking and distribution are core features.  Makes Java very good for building networked applications, server side components,  In other languages these are additional APIs.
  • 5. Features of JVM  The Garbage Collector  Runs in the background and cleans up memory while application is running.  Java manages memory for you, the developer has no control over the allocation of memory (unlike in C/C++).  This is much simpler and more robust (no chance of memory leaks or corruption).  The Just In Time compiler (JIT)  Also known as “Hot Spot”.  Continually optimises running code to improve performance.  Can approach the speed of C++ even though its interpreted.
  • 6. (Cont.)Features of JVM  Security  Java offers very fine control over what an application is allowed to do.  E.g. Read/write files, open sockets to remote machines, discover information about the users environment, etc.  Used in Java Applets to create a “sandbox”. Stops a rogue applet attacking your machine.  Makes Java very safe, an important feature in distributed systems.  Class Loading  Loading of bytecode into the virtual machine for execution.  Code can be read from a local disk, over a network, or the Internet.  Allows downloading of applications and applets on the fly.
  • 7. Versions of Java  JDK Alpha and Beta(1995)  JDK 1.0(January 23,1996)  JDK 1.1(February 19,1997)  J2SE 1.2(December 8,1998)  J2SE 1.3(May 8,2000)  J2SE 1.4(February 6,2002)  J2SE 5.0(September 30,2004)  J2SE 6.0(December 11,2006)  J2SE 7.0(July 28,2011)  J2SE 8.0(March 18,2014)  J2SE 9.0 & 10.0 are scheduled to release in 2016 & 2018 respectively.
  • 8. Data Types In Java, there are two categories of data types- 1. Primitive Data Types 2. Non-Primitive Data Types Data Type Default Type Default Size boolean False 1 bit char ‘u0000’ 2 byte byte 0 1 byte short 0 2 byte int 0 4 byte long 0L 8 byte float 0.0f 4 byte double 0.0d 8 byte
  • 9. Naming Conventions Java Naming Convention is a rule to follow as you decide what to name your identifiers such as class, package, variable, constant, method, etc. Name Conventions Class Name Should start with uppercase letter and be a noun e.g. String, Colour, Button, Thread, etc. Interface Name Should start with uppercase letter and be an adjective e.g. Runnable, ActionListener, etc. Method Name Should start with lowercase letter and be a verb e.g. actionPerformed(), main), println(), etc. Variable Name Should start with lowercase letter e.g. forstName, orderNumber, etc. Package Name Should be in lowercase letter e.g. java, lang, sql,util, etc. Constant Name Should be in uppercase letter e.g. RED, YELLOW, etc.
  • 10. Java OOP’s Concept  Object Oriented Programming is a paradigm that provides many concepts such as inheritance, data binding, polymorphism etc.  Java concepts-  Object  Class  Inheritance  Polymorphism  Abstraction  Encapsulation
  • 11. Object  An entity that has state and behavior is known as an object e.g. chair, bike, marker, pen, table, car etc.  An object has three characteristics:  State- represents data(value) of an object.  Behaviour- represents the behaviour (functionality) of an object such as deposit, withdraw, etc.  Identity- Object identity is typically implemented via a unique ID. The value of the ID is not visible to the external user but, it is used internally by the JVM to identify each object uniquely.  Object is an instance of a class.
  • 12. Class  A class is a group of objects that has common properties. It is a template or blueprint from which objects are created.  A class in java can contain-  Data member  Method  Constructor  Block  Class and interface  By default, all data members and methods are private in Java.
  • 13. Example of Class class Student{ int age; String name; void printData(){ System.out.println(“Name:”+name+”nAge:”+age); } public static void main(String args[]){ Student st=new Student(); st.name=“John”; st.age=22; st.printData(); } }
  • 14. Inheritance  Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.  The idea behind inheritance in java is that you can create new classes that are built upon existing classes.  Inheritance represents the IS-A relationship, also known as parent- child relationship.  It provides the mechanism of usability of code.  The extends keyword is used to derive a new class from existing class.
  • 15. Types of Inheritance  Single  Multilevel  Hierarchical  Java does not support Multiple Inheritance because it creates the ambiguity in the program.
  • 16. Polymorphism  Polymorphism in java is a concept by which we can perform a single action by different ways. Polymorphism is derived from 2 greek words: poly and morphs.  The word "poly" means many and "morphs" means forms. So polymorphism means many forms.  There are two types of polymorphism in java:  Compiletime Polymorphism  Runtime Polymorphism  We can perform polymorphism in java by method overloading and method overriding.
  • 17. Method Overloading  If a class have multiple methods by same name but different parameters, it is known as Method Overloading.  Method overloading increases the readability of the program.  There are two ways to overload the method in java:  By changing number of arguments.  By changing the data types.
  • 18. Method Overriding  If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in java.  Usages-  Method overriding is used to provide specific implementation of a method that is already provided by its super class.  Method overriding is used for runtime polymorphism  Rules-  method must have same name as in the parent class  method must have same parameter as in the parent class.  must be IS-A relationship (inheritance).
  • 19. Abstraction  Abstraction is a process of hiding the implementation details and showing only functionality to the user.  Another way, it shows only important things to the user and hides the internal details.  For example sending SMS, you just type the text and send the message. You don't know the internal processing about the message delivery.  Abstraction lets you focus on what the object does instead of how it does it.
  • 20. Encapsulation  Encapsulation in java is a process of wrapping code and data together into a single unit, for example capsule i.e. mixed of several medicines.  We can create a fully encapsulated class in java by making all the data members of the class private.  Advantages:  By providing only setter or getter method, you can make the class read-only or write-only.  It provides you the control over the data.  The Java Bean class is the example of fully encapsulated class.
  • 21. MySQL  The most popular Open Source Relational SQL database management system.  One of the best RDBMS being used for developing web-based software applications.  Uses a standard form of the well-known SQL data language, works on many operating systems and with many languages including PHP, PERL, C, C++, JAVA, etc.