Download - History of java
![Page 1: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/1.jpg)
HISTORY OF JAVA
![Page 2: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/2.jpg)
JAVA
• Father of Java: James GasolineEXPANSIONS:• API-Application Programming Interface• SDK-Software Development Kit• JVM-Java virtual machine
![Page 3: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/3.jpg)
History of Java• 1990 oak : To control microprocessors Embedded in customer item• Oak needed to be
– Platform independent– Extremely reliable– Compact
• 1993: Java – Internet and web exploration– Internet application
• 1994: Hot Java Browser• 1995: java1. 0
![Page 4: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/4.jpg)
VERSIONS OF JAVA
• 1995 version 1.0:– The Java development kit was released for free by
the sun– 8-packages 212-classes– Microsoft and other companies licensed Java
• 1997 version 1.1:– 23 -packages 504-classes– Improvement include better event handling inner
classes , improved jvm
![Page 5: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/5.jpg)
– Microsoft developed its own 1.1 compatible Java virtual machine for internet explorer
– Many browsers in use are still compatible only with 1.1
1999 version 1.2: -It is also called as the Java 2 platform -59 packages 1520 classes -Code & tools distributed as the SDK
-A Java foundation class based on swings for improved graphics and user interfaces
![Page 6: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/6.jpg)
– Collection API included list sets and hash map
2000 VERSION 1.3: - 76 packages 1842 classes
- Java sound 2002 VERSION 1.4:
- 135 PACKAGES 2991 classes - Improved I , xml support etc..,
2004 VERSION 5.0 (1.5): - 165 packages over 3000 classes
- Faster startup metadata formatted output
![Page 7: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/7.jpg)
– Generic to operate on objects of various types
2006 JAVA SE 6:– Scripting language support
2011 JAVA SE 7:– JVM support for dynamic language– String in switch– Allowing underscores in numeric literals
FUTURE RELEASES:JAVA SE 8: – LAMBDA OPERATOR is expected in summer 2013
JAVA SE 9:– Under planning
![Page 8: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/8.jpg)
PACKAGES
• Each class has different methods is called packages
![Page 9: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/9.jpg)
FEAUTURES OF JAVA TECHNOLOGY
PLATFORM INDEPENDENT:– Write once run anywhere
OBECT ORIENTED:– No coding outside of class definitions including
main ()– An extensive class library available in the core
language packages
![Page 10: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/10.jpg)
COMPILER AND INTERPRETER:– Code is compiled to byte codes that are
interpreted by a JVM– This provides portability to any machine for which
a virtual machine has been written – The two steps of compilation and interpretation
allow for extensive code checking and improved security
ROBUST:– Exception handling built-in strong type checking
![Page 11: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/11.jpg)
Several dangerous features of c & c++– No memory pointers– No pre processor– Garbage collector
AUTOMATIC MEMORY MANAGEMENT: – Automatic garbage collection memory
management handled by the JVM
SECURITY:– No memory pointers– Programs run inside the virtual machine sandbox
![Page 12: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/12.jpg)
CODE PATHOLOGIES REDUCED BY:Byte code verifier:– Checks classes after loading
Class loaders:– Confines object of unique namespace
Security manager:– Determines what resources a class can access
![Page 13: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/13.jpg)
JavaSource(. Java)
Java compiler
Java byte code
(. Byte)
Java byte code move
locally or through
the network
Class loader byte codes
Verifier
Java class libraries
Java interpreter
Just in time
compiler
Run time system
Operating system
Hardware
![Page 14: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/14.jpg)
Differencec
• Focus on logic
• Procedure or structure oriented
• Top – down approach (Based on variable declaration)
c++
• Focus on both logic and data
• Object oriented programming language
• Bottom – top approach(Variable declaration
![Page 15: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/15.jpg)
C++
• Partially object oriented language
• Pointers concept and Preprocessor are available
• Operator overloading is available
• Platform dependent
• A destructor is used to free the memory
• The compiler is present
JAVA• Purely object oriented
language
• Pointers concept and Preprocessor is not available
• Operator overloading is not available
• Platform independent
• Automatic garbage collection
• Both compiler and interpreter is present
![Page 16: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/16.jpg)
Markup language
• HTML, XML
• Design based language
Programming language
• C, C++, JAVA etc..,
• Logic based language
![Page 17: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/17.jpg)
XML• User defined tags
• Focused on data storage
• Case sensitive
HTML• Predefined tags
• Focused on design
• Non case sensitive
![Page 18: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/18.jpg)
Difference between function member function and method
Function:• Independent calling (in c)Member function:• Partially dependent on object (in c++)(Members of class)Methods:• Fully dependent on object (Java)
![Page 19: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/19.jpg)
Version 1.7 (string in switch)Import Java. Io. *;Class strswitch{Public static void main(string g[]){String s=“aaa”;Switch (s){Case “aaa”:
system.out.println(“from aaa”);Case “bbb”:
system.out.println(“from bbb”);Default:
system.out.println(“from default”);}}}
![Page 20: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/20.jpg)
Output
from aaa
![Page 21: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/21.jpg)
Integer literal
Import java.io.*;Class intliteral{Public static void main(string g[]){int a=12_78_56;System.out.println(“a=“+a);}}
![Page 22: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/22.jpg)
Output
a=127856
![Page 23: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/23.jpg)
Special Keywords in Java
• Static• Final• Volatile• Transient• Strictfp• Assert• Byte• Native• Boolean
![Page 24: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/24.jpg)
Final:– Final is also like constant the give value can not change
throughout the program
Transient:– Used within a certain period of time So it's not used
more
Strictfp:– Display the exact result in a float
Assert:– Implementing our assumption
![Page 25: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/25.jpg)
Native:– A program created in c can be accessed in Java
Byte:– Between range (-128 to 0 to 127)– Eg: byte b=123 is accepted
Byte b=129 is not accepted
Boolean:– Assigning true or false to a statement or block
![Page 26: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/26.jpg)
Static and Volatile
Static :– A common memory allocation
Volatile:– Share the value
![Page 27: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/27.jpg)
Example for static and volatile
Eg Program:Class samp{int a;Static int b;Volatile int c;}{Samp s1.new samp;Samp s2.new samp;Samp s3.new samp;}
![Page 28: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/28.jpg)
Static memory allocation
a=1 ,b=2 ,c=3 s1 s2 s3ac b (b is declared as static so it is
used in common)
1 0 0
3 3 3
2
![Page 29: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/29.jpg)
Volatile memory allocation
a=1 ,b=2 ,c=3 s1 s2 s3a c (volatile value will be
shared among the object) b
1 0 0
3 3 3
2
![Page 30: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/30.jpg)
Java literalsInteger literal:Eg: int a=10;
int b=010;In integer literal if the first value is ‘0’ compilerwill take that as octal value.Perform the operation and display the outputOutput:8
![Page 31: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/31.jpg)
int a=1;int b=2;int c=0x10; In integer literal if the first value is ‘0x’ compilerwill take that as hexadecimal value.Perform the operation and display the outputOutput:16
![Page 32: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/32.jpg)
Character literals
Declarations:Char c=’p’;Char c=98;Char c=‘\n’; ”\0 is not used in java”Char c=‘\u0009’; (unicode)
![Page 33: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/33.jpg)
Float literals
Declaration:Float f=12.56f;Float f=12.; (‘f’ no need compiler will take that
as 12.0)Bytes =4;Maximum digits =6Double:double d=75.76835457786(maximum range is
not defined)
![Page 34: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/34.jpg)
String literalsstring s=“erode”;String s=“ero\bde”(o/p:erde(since /b is defined
as backspace))Eg:int a=10;int b=20;int c=30;string s=“hai”;s.o.p(“a+b+c+s”);s.o.p(“a+b+s+c”);s.o.p(“a+s+b+s”);
![Page 35: History of java](https://reader034.vdocuments.us/reader034/viewer/2022052411/5563a63cd8b42a01658b54df/html5/thumbnails/35.jpg)
output
60hai30hai3010hai2030(still it finds the string it will add the
content or numbers)