Download presentation
Presentation is loading. Please wait.
Published byGarey Bridges Modified over 8 years ago
1
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction
2
Introduction Origin A part of a development of an advanced software for consumer electronics Small, reliable, portable, distributed, real-time embedded systems Problems Compiler technology Several other problems Solution Changing language Java (2012-1) Java 2
3
Features (1) (2012-1) Java 3 Simple Object-oriented Distributed Interpreted Robust Secure Architecture neutral Portable high-performance Multithreaded Dynamic
4
Features (2) (2012-1) Java 4 Simple Omitted features from C++ Operator overloading Multiple inheritance Extensive automatic coercions Added features Auto garbage collection: easy programming, reduction of bugs
5
Features (3) (2012-1) Java 5 Being small Construction of software the can run stand-alone in small machines Size of basic interpreter and class support: 40K bytes + basic standard libraries and thread support: additional 175K Object-Oriented Clean definition of interfaces Provide reusable “software ICs” Design for data (object) and interface to it
6
Features (4) (2012-1) Java 6 Distributed Extensive library of routines for TCP/IP protocols: HTTP, FTP, … Robust Java is intended to write reliable programs Early checking for possible problems dynamic (runtime) checking eliminate situations that are error prone Strongly typed language: compile time checking Pointer model: eliminates the possibility of overwriting memory and corrupting data
7
Features (5) (2012-1) Java 7 Secure Java is intended to be used in networked/distributed environments Authentication techniques based on public-key encryption Architecture Neutral Java is designed to support applications on networks Compiler generates an architecture neutral object file format Bytecode instructions Easy to interpret on any machine Easily translated into native machine code on the fly
8
Features (6) (2012-1) Java 8 Portable No implementation dependent aspects of the specifications “int”: a signed two’s complement 32 bit integer “float”: 32-bit IEEE 754 floating point number Libraries of the system define portable interfaces Abstract Window class Implementations of it for Unix, Windows, and the Macintosh
9
Features (7) (2012-1) Java 9 Interpreted Java interpreter: execute Java bytecode More compile-time information is available at runtime Linker’s type checking RPC protocol derivation Easy to debugging
10
Features (8) (2012-1) Java 10 High performance Bytecode can be translated on the fly into machine code Automatic register allocation Complier does some optimization Reasonably good code The performance of bytecodes converted to machine code is almost indistinguishable from native C or C++
11
Features (9) (2012-1) Java 11 Multithreaded Threads: lightweight processes or execution contexts Doing many things at the same time Sophisticated set of synchronization primitives based on the monitor and condition variable paradigm Better interactive responsiveness and real-time behavior
12
Summary (2012-1) Java 12 Java language provides a powerful addition to the tools that programmers have at their disposal Java makes programming easier: OO, automatic garbage collection Java applications are ideal for a diverse environment like Internet
13
Java’s Running Environment (2012-1) Java 13 Java bytecode Machine code instruction for Java Virtual Machine “write once, run anywhere” philosophy Java Platform Java Virtual Machine (Java VM) Java Application Programming Interface (Java API) package
14
(2012-1) Java 14
15
(2012-1) Java 15
16
Java program Creation Process (2012-1) Java 16 Application Create a source file: HelloWorld.java Compile the source file: javac HelloWorld.java Run the program: java HelloWorld Applet Create a source file: HelloWorld.java Create a html file: HelloWorld.html Compile the source file: javac HelloWorld.java Run the program: appletviewer HelloWorld.html
17
Getting Started (1) (2012-1) Java 17 Class: blueprint Object Members Fields: state Methods: behavior, collections of statements
18
Getting Started (2) (2012-1) Java 18 HelloWorld program main: method of class, public, static, void static: belongs to class, not associated with a particular instnace Signature: name of method + parameter list Method declaration: signature + body Method invocation: object reference
19
(2012-1) Java 19 class HelloWorld { public static void main(String[] args) { System.out.println(“Hello, world”); }
20
Getting Started (3) (2012-1) Java 20 Compile javac HellowWorld.java javac is Java compiler Run java HelloWorld java is the Java bytecode interpreter
21
21 Java Compile and Runtime Environment Java source code bytecodes Bytecodes: instructions for JVM Applets Store byte code files on an HTTP server When an user runs applets Bytecodes are loaded into memory and verified for security
22
22
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.