History of java'
Upcoming SlideShare
Loading in...5
×
 

History of java'

on

  • 712 views

 

Statistics

Views

Total Views
712
Views on SlideShare
712
Embed Views
0

Actions

Likes
2
Downloads
21
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Last value stored in b will be taken as common valueIf b= 7 means the value will be changed as 7

History of java' History of java' Presentation Transcript

  • HISTORY OF JAVA
  • JAVA• Father of Java: James GasolineEXPANSIONS:• API-Application Programming Interface• SDK-Software Development Kit• JVM-Java virtual machine
  • History of Java• 1990 oak : To control microprocessorsEmbedded 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
  • VERSIONS OF JAVA• 1995 version 1.0:– The Java development kit was released for free bythe sun– 8-packages 212-classes– Microsoft and other companies licensed Java• 1997 version 1.1:– 23 -packages 504-classes– Improvement include better event handling innerclasses , improved jvm
  • – Microsoft developed its own 1.1 compatible Javavirtual machine for internet explorer– Many browsers in use are still compatible onlywith 1.11999 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 swingsfor improved graphics and user interfaces
  • – Collection API included list sets and hash map2000 VERSION 1.3:- 76 packages 1842 classes- Java sound2002 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 formattedoutput
  • – Generic to operate on objects of various types2006 JAVA SE 6:– Scripting language support2011 JAVA SE 7:– JVM support for dynamic language– String in switch– Allowing underscores in numeric literalsFUTURE RELEASES:JAVA SE 8:– LAMBDA OPERATOR is expected in summer 2013JAVA SE 9:– Under planning
  • PACKAGES• Each class has different methods is calledpackages
  • FEAUTURES OF JAVA TECHNOLOGYPLATFORM INDEPENDENT:– Write once run anywhereOBECT ORIENTED:– No coding outside of class definitions includingmain ()– An extensive class library available in the corelanguage packages
  • COMPILER AND INTERPRETER:– Code is compiled to byte codes that areinterpreted by a JVM– This provides portability to any machine for whicha virtual machine has been written– The two steps of compilation and interpretationallow for extensive code checking and improvedsecurityROBUST:– Exception handling built-in strong type checking
  • Several dangerous features of c & c++– No memory pointers– No pre processor– Garbage collectorAUTOMATIC MEMORY MANAGEMENT:– Automatic garbage collection memorymanagement handled by the JVMSECURITY:– No memory pointers– Programs run inside the virtual machine sandbox
  • CODE PATHOLOGIES REDUCED BY:Byte code verifier:– Checks classes after loadingClass loaders:– Confines object of unique namespaceSecurity manager:– Determines what resources a class can access
  • JavaSource(. Java)Java compilerJava bytecode(. Byte)Java bytecodemovelocally orthroughthenetworkClass loaderbyte codesVerifierJava classlibrariesJavainterpreterJust intimecompilerRun time systemOperating systemHardware
  • Differencec• Focus on logic• Procedure or structureoriented• Top – down approach(Based on variable declaration)c++• Focus on both logic anddata• Object orientedprogramming language• Bottom – top approach(Variable declaration
  • C++• Partially object orientedlanguage• Pointers concept andPreprocessor are available• Operator overloading isavailable• Platform dependent• A destructor is used to freethe memory• The compiler is presentJAVA• Purely object orientedlanguage• Pointers concept andPreprocessor is notavailable• Operator overloading is notavailable• Platform independent• Automatic garbagecollection• Both compiler andinterpreter is present
  • Markup language• HTML, XML• Design based languageProgramming language• C, C++, JAVA etc..,• Logic based language
  • XML• User defined tags• Focused on data storage• Case sensitiveHTML• Predefined tags• Focused on design• Non case sensitive
  • Difference between function memberfunction and methodFunction:• Independent calling (in c)Member function:• Partially dependent on object (in c++)(Members of class)Methods:• Fully dependent on object (Java)
  • 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”);}}}
  • Outputfrom aaa
  • Integer literalImport java.io.*;Class intliteral{Public static void main(string g[]){int a=12_78_56;System.out.println(“a=“+a);}}
  • Outputa=127856
  • Special Keywords in Java• Static• Final• Volatile• Transient• Strictfp• Assert• Byte• Native• Boolean
  • Final:– Final is also like constant the give value can notchange throughout the programTransient:– Used within a certain period of time So its not usedmoreStrictfp:– Display the exact result in a floatAssert:– Implementing our assumption
  • Native:– A program created in c can be accessed in JavaByte:– Between range (-128 to 0 to 127)– Eg: byte b=123 is acceptedByte b=129 is not acceptedBoolean:– Assigning true or false to a statement or block
  • Static and VolatileStatic :– A common memory allocationVolatile:– Share the value
  • Example for static and volatileEg Program:Class samp{int a;Static int b;Volatile int c;}{Samp s1.new samp;Samp s2.new samp;Samp s3.new samp;}
  • Static memory allocationa=1 ,b=2 ,c=3s1 s2 s3acb (b is declared as static so it isused in common)1 0 03 3 32
  • Volatile memory allocationa=1 ,b=2 ,c=3s1 s2 s3ac (volatile value will beshared among the object)b1 0 03 3 32
  • 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
  • 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
  • Character literalsDeclarations:Char c=’p’;Char c=98;Char c=‘n’; ”0 is not used in java”Char c=‘u0009’; (unicode)
  • Float literalsDeclaration:Float f=12.56f;Float f=12.; (‘f’ no need compiler will take thatas 12.0)Bytes =4;Maximum digits =6Double:double d=75.76835457786(maximum range isnot defined)
  • String literalsstring s=“erode”;String s=“erobde”(o/p:erde(since /b is definedas 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”);
  • output60hai30hai3010hai2030(still it finds the string it will add thecontent or numbers)