Home
Programming
AspectJ   Basic   C   C++   C#   Eiffel   Java   JavaScript   Pascal   PHP   Python   Rexx   Ruby   Scriptol   Tcl
Markup
HTML   XML   XAML   XUL
Query
SQL

Java - For Web Applications

Java was built by Sun's programmers in 1995, in reply to the uncompatibility between various systems and libraries they have to deal with. The first version, named Oak, was targetted at embedded system, with no success. The emergence of Internet gave the language its chance. It was funded on C++ to avoid the teaching of a new syntax, but remove lots of drawbacks from C++. Java is now one of the most widely used programming language, mainly on networks and for web service.

Features

- Syntax simalar to the C's one.
- Pointers doesn't exist in Java. Object are passed by reference, simple variables by value.
- Garbage collector and multi-threading are built in.
- Each file holds a single public class.
- Multiple inheritance and overloading of operators are missing. Generic functions are planned.
- Applets are programs that run through the Web embedded inside html page...
- Compile to portable byte code.

Why to use Java?

 Using Java rather than C++ improve productivity. Along the free compiler comes a complete collection of APIs, graphical and other, that is a standard. Java Programs are clearly slower that C++ ones. But they run under Windows, Linux and so ones... You can insert Java applets inside web pages.
 It is also a plateform for web services, allowing to consult databases from within Internet.

Sites and tools

Sample code

Merging and displaying lists
   String s = new String("demo");
   for(int i = 0; i < s.length(); i++)
   {
     char c = s.charAt(i);
     System.out.print(c);
   } 
Home