Java Starting

22
SESSION 1 JAVA SE

description

Presented by: N.V.Rajasekhar Reddy www.technolamp.co.in Want more interesting... Watch and Like us @ https://www.facebook.com/Technolamp.co.in subscribe videos @ http://www.youtube.com/user/nvrajasekhar

Transcript of Java Starting

Page 1: Java Starting

SESSION 1

JAVA SE

Page 2: Java Starting

OBJECTIVES: Introduction Need of Programming languages Different Programming languages Java need in today’s world Categorization of java Installation of a JDK Execution of a java program JRE – JVM – JDK – SDK - IDE

Page 3: Java Starting

Introduction A programming language is an artificial language

designed to communicate instructions to a machine, particularly a computer.

Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.

Page 4: Java Starting

Contd…

The description of a programming language is usually split into two components. They are Syntax (form) and Semantics (meaning).

Finally programming language is a language, which is used to maintain communication with a System.

Page 5: Java Starting

Need of Programming languages

Page 6: Java Starting

Different Programming languages

Applications and Program developmentCC#C++DJavaTclVisual Basic

Artificial Intelligence development

AIMLCC#C++Prolog

Database development

DBASEFoxProMySQLSQLVisual FoxPro

Script development

awkbashBatchfilePerlTcl

Game development

CC#C++DarkBASICJava

Computer drivers or other hardware interface development

AssemblyC

Internet and web page development

HDMLHTMLJavaJavaScriptPerlPHPXML

Page 7: Java Starting

Java needs in today’s world

For Desktop

Enterprise

Go Mobile

Embedded

Internet (Client/Server)

Page 8: Java Starting

Categorization of java

Java Card Micro Edition (ME) JAVA ME Standard Edition (SE) JAVA SE Enterprise Edition (EE) JAVA EE JavaFX PersonalJava (discontinued)

Page 9: Java Starting

Java Platform & VM & Devices

Page 10: Java Starting

Versions of java

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) Java SE 6 (December 11, 2006) Java SE 7 (July 28, 2011)

Page 11: Java Starting

Installation of a JDK (JAVA SE)

Video reference

Page 12: Java Starting

Execution of a java program

Write a program in Notepad or IDE or any text editor

Save as FileName.java Compile javac FileName.java Run java FileName.java

Page 13: Java Starting

Source Computer

Java Program Compilation Java ByteCode

Your computer

Java ByteCode ExecutionRestricted Env.

Verification

Internet

Page 14: Java Starting

Execution model of java

virtual machine

source(text) compiler

CPU

bytecodeinterpreterbytecodeinterpreter

dynamicloading

JITcompiler

JITcompiler

compiledcode

compiledcode

JVML

verifier

bytecode(aka. class file)

Page 15: Java Starting

JRE – JVM – JDK – SDK - IDE

JRE : JAVA RUNTIME ENVIRONMENT

JVM : JAVA VIRTUAL MACHINE

JDK : JAVA DEVELOPMENT KIT

SDK : SOFTWARE DEVELOPMENT KIT

IDE : INTEGRATED DEVELOPMENT ENVIRONMENT

Page 16: Java Starting
Page 17: Java Starting

JVM : A self-contained operating environment that behaves as if it is a separate computer. For example, Java applets run in a Java virtual machine (JVM) that has no access to the host operating system.

JRE: Java Run-Time Environment is the part of the Java Development Kit (JDK) required to run Java programs.

It comprises the Java Virtual Machine, the Java platform core classes, and supporting files. It does not include the compiler, debugger, or other tools present in the JDK. ...

Page 18: Java Starting

JDK(Java Development Kit) :

software development package from Sun Microsystems that implements the basic set of tools needed to write, test and debug Java applications and applets

SDK(Software Developers Kit)

a set of tools, including API, frameworks, interface elements, etc. used to create software, i.e. apps.

IDE:

An integrated development environment (IDE) (also known as integrated design environment, integrated debugging environment or interactive development environment) is a software application that provides comprehensive facilities to computer programmers for software development.

Page 19: Java Starting
Page 20: Java Starting

Questions… 1) What is the use of bin and lib in JDK?

A) Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.

2) Question: What's the difference between J2SDK 1.5 and J2SDK 5.0?

A) There's no difference, Sun Microsystems just re-branded this version.

3) The Differences among Java, C And C++ ?

A) Paradigm , Preprocessor, Memory Management, Pointers, Bounds Checking, Portability And Performance, Complex Data Types, Strings, Multiple Inheritance, Goto Statement …

Page 21: Java Starting

Feature C C++ Java

Paradigms ProceduralProcedural, OOP, Generic Programming

OOP, Generic Programming (from Java 5)

Form of Compiled Source Code

Executable Native Code Executable Native Code Java bytecode

Memory management Manual ManualManaged, using a garbage collector

Pointers Yes, very commonly used.Yes, very commonly used, but some form of references available too.

No pointers; references are used instead.

Preprocessor Yes Yes No

String Type Character arrays Character arrays, objects Objects

Complex Data Types Structures, unionsStructures, unions, classes

Classes

Inheritance N/A Multiple class inheritanceSingle class inheritance, multiple interface implementation

Operator Overloading N/A Yes No

Automatic coercionsYes, with warnings if loss could occur

Yes, with warnings if loss could occur

Not at all if loss could occur; msut cast explicitly

Variadic Parameters Yes Yes No

Goto Statement Yes Yes No

Page 22: Java Starting

To be contd…