История создания и эволюция языка java

92
Основные особенности языка Java - краткий обзор Ведущий семинара: Максим Лейкин, компания «МЕРА НН»

Upload: ann-house

Post on 02-Jan-2016

75 views

Category:

Documents


7 download

DESCRIPTION

Основные особенности языка Java - краткий обзор Ведущий семинара: Максим Лейкин, компания «МЕРА НН». История создания и эволюция языка Java. Sun Microsystems ( www.sun.com ) – ныне часть компании Oracle ( www.oracle.com ). Patrick Naughton. James Gosling. Scott McNealy. - PowerPoint PPT Presentation

TRANSCRIPT

Deployment of Corporate Peer-to-Peer Telephony Networks over DSL / Cable Internet connection

Java - : , 2 Java

James GoslingScott McNealy Patrick NaughtonSun Microsystems (www.sun.com) Oracle (www.oracle.com), 1991 . . ++: , , ..3 Java

, 1992 . Oak ()

23 1995 . Java1999 . - Java 2 SE Java 2 Standard Edition4 Java () Java- GUI

5

C++Java"Write Once, Run Anywhere"6

Java- , , .JVM (Java Virtual Machine, Java-) , -7

8 , Java- .

9 (garbage collection) () Java is C++ without the Guns and Knives () J.Gosling 10 Java . Java : Thread, , . 11JVM - , -. Java- . JVM Java-.

12

(collections framework) Java , .13 : 2. 3. ( )4. 5.

14 GUI Java 2 , GUI:- AWT (Abstract Window Toolkit) - , OS API- Swing - - , Java, OS API , Java

15 Java Software Development Kit - Oracle Java(TM) SE Development Kit 7http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. RAD :Eclipse Project (open source project) NetBeans (open source project)IntelliJ IDEA (JetBrains) JCreator Pro (Xinox Software)Symantec Cafe (Symantec)Visual J++ (Microsoft)Together (TogetherSoft Corporation)

Java- !16 Javaclass FirstProg{public static void main(String args[ ]){System.out.println (Hello, world);}}1.

2.-> FirstProg.class

17 1. ., . Java 2 . , BHV, 2001.2... Java. .: , 2007. 3. . . Thinking in Java. .:, 2009.4. Joshua Bloch. Effective Java: Second Edition. Prentice Hall, 2008.5. .. JAVA. , UML. .: , 2004. http://docs.oracle.com/javase/tutorial/http://www.intuit.ru/department/pl/javapl/

18

class {[] ; [] ; [] ( Point3D(10,20,30)40

superclass Point3D extends Point{int z; Point3D () { z=0; } Point3D (int x1,int y1, int z1) { super (x1, y1); z=z1; }}Point3D p3d = new Point3D(); Point() -> Point3D()Point3D p3d = new Point3D(10, 20, 30); Point(10, 20) -> Point3D(10,20,30)41 class Parent{public int v1; private int v2; protected int v3; int v4; } class Child extends Parent{ // v1, v3, v4 // v2} class Other{ // v1, v3, v4 // v2} 42 Java-, private, set/get (/) Eclipse: Source -> generate Getters and Setters43 class Point{int x, y; Point () {x=0; y=0; } Point (int x1,int y1) {x=x1; y=y1; }}class Point{private int x, y; Point () {x=0; y=0; } Point (int x1,int y1) {x=x1; y=y1; } public int getX() {return x;} public int getY() {return y;} public int setX(int x) { this.x = x;} public int setY(int y) { this.y = y;}}44

, . , , .45

class Point{int x, int y;}class Point3D extends Point{int z;}Point Pobj = new Point();Point3D Cobj = new Point3D();Pobj = Cobj;Pobj.x = 1; //! x PointPobj.z = 10; //! z Point46

(overriding) , . , , , . 47

class Figure{double dim1, dim2; Figure(double a, double b) {dim1 = a; dim2 = b; } void square(){System.out.println (Square is not defined); }}class Rectangle extends Figure{Rectangle(double a, double b){super(a,b);} void square(){System.out.println(Rectangle square = + (dim1*dim2)); }}48

class Triangle extends Figure{Triangle(double a, double b){super(a,b);} void square(){System.out.println(Triangle square= + (dim1*dim2/2)); }}class FindSquare{public static void main(String args[ ]){Figure f; Random r = new Random(); for (int k=0; k