Presentation is loading. Please wait.

Presentation is loading. Please wait.

We will talking about story of JAVA language. By Kristsada Songpartom.

Similar presentations


Presentation on theme: "We will talking about story of JAVA language. By Kristsada Songpartom."— Presentation transcript:

1 We will talking about story of JAVA language. By Kristsada Songpartom

2 Java works well for web and server-based applications. It has great features like object- oriented programming, easy database access, and well-designed GUI support.Java has performance tweaks to speed up desktop programs. There are libraries for communicating across networks, and for encryption. It has strong security built in. Most programmers pick up Java quickly. Behind all this, Java is more than just the latest, most popular programming language. It is a way of creating applications that are independent of all hardware and all operating systems.

3 History of JAVA Sun Microsystems in 1991 funded an internal corporate research project code-named Green, which resulted in the development of a C++-based language that its creator, James Gosling, called Oak after an oak tree outside his window at Sun. It was later discovered that there already was a computer language called Oak. When a group of Sun people visited a local coffee shop, the name Java was suggested, and it stuck. And Sun formally announced Java at a major conference in May 1995. Sun Microsystems in 1991 funded an internal corporate research project code-named Green, which resulted in the development of a C++-based language that its creator, James Gosling, called Oak after an oak tree outside his window at Sun. It was later discovered that there already was a computer language called Oak. When a group of Sun people visited a local coffee shop, the name Java was suggested, and it stuck. And Sun formally announced Java at a major conference in May 1995.

4 Why must be JAVA ? We want software that works—consistently, anywhere, on any platform—and that plays well with other applications. We want dynamic applications that take advantage of a connected world, capable of accessing disparate and distributed information sources. We want truly distributed software that can be extended and upgraded seamlessly. We want intelligent applications—such as autonomous agents that can roam the Net for us, ferreting out information and serving as electronic emissaries. We want software that works—consistently, anywhere, on any platform—and that plays well with other applications. We want dynamic applications that take advantage of a connected world, capable of accessing disparate and distributed information sources. We want truly distributed software that can be extended and upgraded seamlessly. We want intelligent applications—such as autonomous agents that can roam the Net for us, ferreting out information and serving as electronic emissaries.

5 Primary goals There were five primary goals in the creation of the Java language There were five primary goals in the creation of the Java language 1. It should use the object-oriented programming methodology. 1. It should use the object-oriented programming methodology. 2. It should allow the same program to be executed on multiple operating systems. 2. It should allow the same program to be executed on multiple operating systems. 3. It should contain built-in support for using computer networks. 3. It should contain built-in support for using computer networks. 4. It should be designed to execute code from remote sources securely. 4. It should be designed to execute code from remote sources securely. 5. It should be easy to use by selecting what were considered the good parts of other object-oriented languages. 5. It should be easy to use by selecting what were considered the good parts of other object-oriented languages.

6 Main features of the JAVA "Write once, run anywhere" (WORA) "Write once, run anywhere" (WORA) Java can be developed on any device, compiled into a standard bytecode and be expected to run on any device equipped with a Java virtual machine (JVM). The installation of a JVM or Java interpreter on chips.

7 Some good things about Java Java has a garbage collector so there are no destructors. Memory management is handled by the system, not by each program. Java has a garbage collector so there are no destructors. Memory management is handled by the system, not by each program. Java catches all array subscript errors and similar. Java never has uninitialized data of any kind. Order of evaluation, etc. is completely defined and natural. Java catches all array subscript errors and similar. Java never has uninitialized data of any kind. Order of evaluation, etc. is completely defined and natural. Java arrays know their own length. (a public read-only field named length.) Java arrays know their own length. (a public read-only field named length.) Java never has dangling references. You still can't derefernce null, however. If you try it will be caught. This is probably the most common run time error. Java never has dangling references. You still can't derefernce null, however. If you try it will be caught. This is probably the most common run time error. Java int, float,... are completely defined, so behave the same on all systems supporting Java. Int is 32 bits with modular arithmetic. In fact the only thing in Java not specified is the effect of the interleaving of threads in a multithreaded program. All casts are checked, either at compile time or at runtime. A narrowing cast is never applied automatically. Java int, float,... are completely defined, so behave the same on all systems supporting Java. Int is 32 bits with modular arithmetic. In fact the only thing in Java not specified is the effect of the interleaving of threads in a multithreaded program. All casts are checked, either at compile time or at runtime. A narrowing cast is never applied automatically.

8 Java interfaces define first class types. This gives most of the strength of both C++ templates and multiple inheritance. Interfaces are very important in Java. Java interfaces define first class types. This gives most of the strength of both C++ templates and multiple inheritance. Interfaces are very important in Java. Java has threads, so concurrent programs are possible with standard tools. Java has threads, so concurrent programs are possible with standard tools. Java has a library with lots of common data structures. Java has a library with lots of common data structures.

9 Some bad things about Java (Actually these things are good, but are placed here since they complicate novice learning.) I/O takes explanation and getting used to. Java standard output is easy. Java standard input is harder. Other input/output is hard. (But its object model is very good.) I/O takes explanation and getting used to. Java standard output is easy. Java standard input is harder. Other input/output is hard. (But its object model is very good.) Java exceptions must be caught and i/o statements throw exceptions. Java exceptions must be caught and i/o statements throw exceptions.

10 Simple Programs Hello Java program. Hello Java program. public class helloJava { public static void main(String[] args) { String hello = "Hello Java"; System.out.println(hello); //the program will show hello and we want to add number then see below. int a = 321; int b = 123; int c = a+b; int d = a+b*c+1+2+3; System.out.println(c); System.out.println(d); }} We have more information in http://garnet.cpe.ku.ac.th/wiki/index.php/JAVA We have more information in http://garnet.cpe.ku.ac.th/wiki/index.php/JAVA


Download ppt "We will talking about story of JAVA language. By Kristsada Songpartom."

Similar presentations


Ads by Google