Java Starting
-
Upload
raja-sekhar -
Category
Education
-
view
519 -
download
0
description
Transcript of Java Starting
SESSION 1
JAVA SE
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
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.
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.
Need of Programming languages
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
Java needs in today’s world
For Desktop
Enterprise
Go Mobile
Embedded
Internet (Client/Server)
Categorization of java
Java Card Micro Edition (ME) JAVA ME Standard Edition (SE) JAVA SE Enterprise Edition (EE) JAVA EE JavaFX PersonalJava (discontinued)
Java Platform & VM & Devices
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)
Installation of a JDK (JAVA SE)
Video reference
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
Source Computer
Java Program Compilation Java ByteCode
Your computer
Java ByteCode ExecutionRestricted Env.
Verification
Internet
Execution model of java
virtual machine
source(text) compiler
CPU
bytecodeinterpreterbytecodeinterpreter
dynamicloading
JITcompiler
JITcompiler
compiledcode
compiledcode
JVML
verifier
bytecode(aka. class file)
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
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. ...
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.
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 …
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
To be contd…