Explain History and Features of Java (or ) Why we use Java on the Web?



Java  is a  product  of “sun  micro systems” Java  is  first  released  with  name  “oak” in  1990’s. Java has altered  and   released  in  number of ways. Present  a new  set  of interfaces , classes called  swing , packages, java beens, EJB, structs  and more  have  been  added. ‘sun’ continuous  to attract   developers  with   millions  downloading  free  software  development kits.

Advantages of  Java:-

Object  orientation.

Platform independent.

Excellent  network  capabilities.

No pointers.

lot  of  books  available in web .

Implementation are  available free  of charge  for  many  popular  platforms.

Interpretation:- Programs  written in plane  text  (source code)s  source  code  is read by interpreter and executed some interrupter convert the source code into an intermediate code called ‘byte code’ and then execute the byte code.

The great advantages of using byte code is that program can be executed fast then the plain text.

Java is an interpreted language and compiled language. When some one writes a java program they run the source code through a utility called “javac” which convert the text into byte code. The byte code is then distributed.   

java


Why we use Java on the web:- Java has the better support for networking than any other programming language. 

Java networking is totally based around the internet suit of protocols. Technologies such as ‘object request brokers’ (ORB) can be used to connect entire corporate networks together including older system.

Java applications can run on servers and client work stations. The common reason for getting into java is probably to develop java applets. These are small programs which can be embedded into webpages and executed automatically.

When the page is loaded by a browser applets extend the functionality of the browser in a variety of ways.

Java performance is great using java script and JSP we can manipulate the elements of HTML page. Java support  mobile phones (or) web TV sets.

Example program for creating a simple Applet program.

import java.io.*;
import java.lang.*;
import java.out.*;
import java.applet.Applet;
class SimpleAwt extends Applet
{
            TextArea ta;
            public void init( )
            {
            ta = new TextArea (2, 30);
            ta. appendText (“Hello world”);
            add (la);
            validate ( );
            }
}

Applet does not need a ‘main( )’ method. Instead applet have a method called “init( )”. This is called by the browser each time you want to start the applet.

<html>

<head>

<title> A simple applet </title>

</head>

<body>

<p> There is a simple awt applet </p>

<object code = “SimpleAwt.class” width = “100” height = “100”/>

</body>


</html>



Related

Web Technology 4754128192027547169

Post a Comment

emo-but-icon

item