Introduccion a Java

Páginas: 13 (3240 palabras) Publicado: 19 de julio de 2011
.+

Introduction to Java

At the end of this chapter you will be able to understand the Java programming language environment and create simple Java programs.

Scope

1. What is Java?

2. Java Versions and Environment

3. Features of Java

4. Program Types in Java
1. Applications
2. Applets

5. Java Language Components
1. Operators
2. Data types
3. Variablesand Literals
4. Statements and Expressions
5. Comments
6. Variable Scope

6. Programming Constructs
1. if
2. switch
3. while
4. do-while
5. for
6. break
7. continue

7. Arrays

1.1 What is Java?

Java language was developed by Sun Microsystems in 1991 as a part of the Green project, a research group working to develop software to control consumerelectronic devices. During this time, they developed a device called Star7, for which the operating system was planned to be developed in C++. However, one of the team members, James Gosling, was not very appreciative of the performance of C++. Hence, he developed a new language for star7. He named it as Oak as he used to see an Oak tree outside his office. Later on, it was found that the name Oak wasbeing used by some other language, so Sun renamed this language as Java.

Java is a platform independent object oriented programming language. When you are writing programs, you always consider where this program is finally going to be executed. For instance, if the program is going to be executed on windows platform, you use the Microsoft Foundation Classes or if it is a Mac machine, then youuse the Mac OS Toolbox. Also, while finally implementing the programs you ensure that along with the source code the compiler has also been sent as every machine uses some or the other kind of processor, and it becomes necessary to compile your program according to the destination machine’s processor. It would be virtually impossible to implement the applications on the Internet, if we imagine thesame scenario there because you don’t know where your program is finally going to be downloaded and run. In order to counteract this problem Java has an in-built mechanism called JVM (Java Virtual Machine) which makes your application compatible to the client’s machine and your program can run on any machine in the Internet.

Unlike C++, Java is totally an object-oriented language. Everything inJava can only be written inside the classes. Though you may think that the programs would somewhat become rigid by confining everything only inside the classes, but it certainly has a profound effect on the programming style. In C++, you have a total flexibility of writing your programs by combining the object oriented or structured programming style. But this mixed approach has a side effect, asthe program tends to be less object oriented if the programmer is more comfortable with the structured programming style, and thus depriving the program of the actual OOP benefits. Moreover, it becomes easier for the designers to design if the approach is totally object oriented than the mixed one.

1.2 Java Versions and Environments

Till now Java has undergone three significant versionchanges. Java was first launched as Java 1.0, which is still extensively supported by a majority of browsers. Then came Java 1.1, which had language enhancements, an improved user interface, and event handling. Since then Java has undergone many more changes and finally Sun has come up with the latest version as Java 1.2.2 which it calls “Java 2”.

Java is available in many environments. Javasoftware is most easily available as JDK (Java Development Toolkit) version 1.0, 1.1 or 1.2. You can download JDK from the Internet at the site http://java.sun.com/products/jdk free of cost.

There are many other development environments for Java. Some of them are as follows:

Java Workshop
Borland Jbuilder
Symantec Visual Cafe
Visual Java (VJ++)
SuperCede etc.

1.3 Features of Java...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Introduccion a java
  • Introduccion a Java
  • Introduccion A Java
  • Introduccion A Java
  • Introducción a java
  • Introduccion a java
  • Introduccion A Java
  • Introduccion Java

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS