sravan java Session1


Published on

this is basic slides

Published in: Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

sravan java Session1

  1. 1. Introduction to Java Session 1
  2. 2. Java - History <ul><li>Developed by a team 18 members headed by James Gosling </li></ul><ul><li>JDK 1.0 is the first working edition of java released by sun Microsystems in 1991. </li></ul><ul><li>JDK 1.2 to JDK 1.7 are commonly known as Java2, JDK 1.5 or jdk5 is the most commonly used java version. </li></ul>
  3. 3. Features <ul><li>Simple and Strictly Object Oriented </li></ul><ul><li>Multi-Threaded </li></ul><ul><li>Distributed </li></ul><ul><li>Secure </li></ul><ul><li>Self-Documented </li></ul><ul><li>Robust </li></ul><ul><li>Platform Independent or Architecture Neutral </li></ul>
  4. 4. <ul><li>Simple </li></ul><ul><ul><li>Simple, because of having the most accepted languages C & C++ being inspirers, and because of having a very few key words 50 in number. </li></ul></ul><ul><li>Strictly Object Oriented </li></ul><ul><ul><li>Strictly object oriented because, that unless and until OOPs are implemented, not a single java code can be executed, unlike other languages like C++ where OOPs concept is a optional feature. </li></ul></ul>
  5. 5. <ul><li>Multi-Threaded </li></ul><ul><ul><li>Java supports multi – threaded programming. </li></ul></ul><ul><ul><li>Every java program itself is a thread under JVM. </li></ul></ul><ul><li>Distributed </li></ul><ul><ul><li>Distributed programming is supported by java through.. </li></ul></ul><ul><ul><ul><li>RMI </li></ul></ul></ul><ul><ul><ul><li>TCP/IP Sockets </li></ul></ul></ul><ul><ul><ul><li>EJB ..etc., </li></ul></ul></ul>
  6. 6. <ul><li>Secure </li></ul><ul><ul><li>Java doesn’t provide pointers or pointer like concepts and hence it can not produce potentially damaging code. </li></ul></ul><ul><ul><li>No Memory access or file system access is available to a java program unless it is authenticated. </li></ul></ul><ul><li>Robust </li></ul><ul><ul><li>Supports Object Oriented Exception Handling </li></ul></ul><ul><ul><li>Supports advanced techniques like Threads, Distributed ness ..etc,. </li></ul></ul>
  7. 7. Self-Documented <ul><li>Java provided a unique provision of special comments, on using which the program can document his/her code while constructing the same. </li></ul><ul><li>This can later be extracted to some html documents. </li></ul><ul><li>This is based on some coding standards, and special tokens of comments. </li></ul>
  8. 8. Coding Standard - 1 <ul><li>Names of variables and methods shall start with and continue in lowercase, but from the second token onwards, initial capitals is to be followed </li></ul><ul><li>Example Variable Names: </li></ul><ul><ul><li>height </li></ul></ul><ul><ul><li>heightInMeters </li></ul></ul><ul><ul><li>boxHeightInMeters </li></ul></ul><ul><li>Example Method Names: </li></ul><ul><ul><li>show() </li></ul></ul><ul><ul><li>toString() </li></ul></ul><ul><ul><li>itemStateChanged() </li></ul></ul>
  9. 9. Coding Standard - 2 <ul><li>Names of user defined data types like classes, interfaces, enumeration shall start and constinue in initial capitals. </li></ul><ul><li>Examples: </li></ul><ul><ul><li>Box </li></ul></ul><ul><ul><li>BoxWithLid </li></ul></ul><ul><ul><li>ArrayIndexOutOfBoundsException </li></ul></ul>
  10. 10. Coding Standard - 3 <ul><li>Names of constants are all capitals, and each token is separated with an (_) underscore. </li></ul><ul><li>Examples: </li></ul><ul><ul><li>PIE </li></ul></ul><ul><ul><li>E </li></ul></ul><ul><ul><li>AVEGADROS_CONSTANT </li></ul></ul><ul><ul><li>LIGHT_VELOCITY </li></ul></ul>
  11. 11. Coding Standard - 4 <ul><li>Names of Java packages are all lower in case and mostly are not more than a token. </li></ul><ul><li>Example Variable Names: </li></ul><ul><ul><li>java </li></ul></ul><ul><ul><li>util </li></ul></ul><ul><ul><li>lang </li></ul></ul><ul><ul><li>io </li></ul></ul>
  12. 12. Platform Independent <ul><li>Java code is basically of the notion write once, execute it anywhere, anytime. </li></ul><ul><li>Platform independency means that the code once compiled can be executed on any OS and on any hardware configuration. </li></ul>
  13. 13. Java Virtual Machine JIT Reflection Classes GC
  14. 14. Compilation of languages like C & C++ Source Code Linux Windows MAC COMPILES ON Linux Executable Code Windows Executable Code MAC Executable Code COMPILES INTO
  15. 15. Java Compilation Source Code COMPILES ON JVM COMPILES INTO JVM understandable Intermediate Byte Code – a class file Class File JVM ------- Linux JVM ----------- Windows JVM ------ MAC Executes ON
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.