1 / 19

Session 1 - Introduction to Java

Java programming for Bigners

habzel
Download Presentation

Session 1 - Introduction to Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Java 1

  2.  Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems in 1991.  This language was initially called “Oak” which was designed for the development of software for consumer electronic devices, but was renamed “Java” in 1995.  Java evolved from C++, which evolved from C, which evolved from BCPL and B.  Java is directly related to both C and C++.  Java inherits its syntax from C. Its object model is adapted from C++. 2

  3. •Originally Java was not designed for developing Internet-based applications rather the need for a platform-independent language software to be embedded in various consumer electronic devices(microwave ovens, remote controls). •Java has become now the language of choice for implementing Internet-based applications and software for devices that communicate over a network. •Java Enterprise Edition (Java EE) is geared toward developing large-scale, applications and web-based applications. used to create distributed networking 3

  4. •Java Micro Edition (Java ME) is geared toward developing applications for small, memory-constrained devices, such as cell phones, pagers and PDAs.. •Java is used to develop large-scale enterprise applications, to enhance the functionality of web servers, to provide applications for consumer devices. •Java programs consist of pieces called classes. Classes include pieces called methods that perform tasks and 4 return information when the tasks are completed.

  5. •Simple: Java has a concise, cohesive set of features that makes it easy to learn and use. •Secure: Java provides a secure means of creating Internet applications. [Viruses] •Portable: Java programs can execute in any environment for which there is a Java run-time system. [Used for developing internet - based 5 applications]

  6. •Robust: Java encourages error-free programming by being strictly typed and performing run-time checks. [Avoid crashes during program execution] •Multithreaded: Java provides integrated support for multithreaded programming (Perform concurrent computations). •Architecture-neutral: Java is not tied to a specific machine or operating system architecture (Platform 6 independent).

  7. •Object-Oriented: Java is pure OOP language - More efficient code reusability & code maintainability. •High performance: The Java bytecode is highly optimized for speed of execution. •Distributed: Java was designed with the distributed environment of the Internet (Handles 7 TCP/IP protocols).

  8. • Object-orientation is a set of tools and methods that enable software engineers to build reliable, user friendly, maintainable, well documented, reusable software systems that fulfils the requirements of its users. • To support the principles of object-oriented programming, all OOP languages, including Java, have three traits in common: encapsulation, polymorphism, and inheritance. 8

  9. 1. Encapsulation •Encapsulation is a programming mechanism that binds together code and data it manipulates, and that keeps both safe from outside interference and misuse. 2. Polymorphism [Take many forms] • Polymorphism is the quality that allows one interface to access a general class of actions. • It is a feature of object-oriented languages whereby the same method call can lead to different behaviours depending on the type of object on which the method call is made. 9

  10. •It’s the ability to create variables and methods that has more than one form. 3. Inheritance •Inheritance is the process by which one object can acquire the properties of another object. •It is the mechanism whereby a class acquires (inherits) the methods and variables of its super classes. 10

  11. •Objects are instances of a class. •An object is a software bundle of related state and behaviour. •Objects interact with each other by passing messages. 11

  12. •A Class is a blueprint that defines the states and the behaviors common to all objects of a certain kind. •A method is the object-oriented term for a procedure or a function. 12

  13. •An interface is a contract between a class and the outside world. •A package is a namespace for organizing classes and interfaces in a logical manner. •Placing your code into packages makes large software projects easier to manage. 13

  14. 14

  15. * 15

  16. Source Code Editors, IDEs (NetBeans, Eclipse, Jbuilder, JCreater, BlueJ...) • Java Virtual Machine (JVM):-Bytecode Interpreter. • A virtual machine(VM) is a software application that simulates a computer, but hides the underlying operating system and hardware from the programs that interact with the VM. • If the same VM is implemented on many computer platforms, applications that it executes can be used on all those platforms. • The JVM is one of the most widely used virtual machines. • The JVM is invoked by the java command java progname 16

  17. •Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). •The Java Virtual Machine is an interpreter for bytecode. 17

  18. 18

More Related