Introduction To Java: Justification For G.U.I
Introduction To Java: Justification For G.U.I
JAVA
In the development of this system I have used JAVA Application
as the front end & ORACLE as the back end & tool is JDK (Java
Development Kit)1.6.
Java is a new and popular programming language created by Sun
Microsystems. The best news about Java is that it is object oriented,
architecture neutral, interpreted, robust, secure, portable, high
performance, multithreaded and dynamic language.
With Java, we can develop a single application that is immediately
usable on multiple platforms. Imagine the countless hours that will save by
being able to develop a single application usable on Windows, Unix and
Macintosh systems.
Java produces two program types: application and applet.
Applications are stand-alone and can be run directly from the command
line. Applets require an external program to provide an interface to the
user.
Java defines data as objects with methods that support the objects.
Java is purely object-oriented and provides abstraction, encapsulation,
inheritance and polymorphism. Even a very basic program has a class. Any
code written is Java is inside a class. Java is tuned to the web. Java
programs can access data across the web as easily as they access data
from a local system. Distributed applications can be build in Java, that use
resources from any other networked computer.
Java is both interpreted and compiled. The code is complied to a byte
code that is binary and platform independent. When a program has to
executed, the code is fetched into the memory and interpreted on the
user’s machine As an interpreted language, Java has simple syntax.
When a piece of code is complied, all errors are listed together. A
program is executed only when all the errors have been rectified. An
interpreter, on the other hand, verifies the code and executes it line by line.
Only when the execution reaches the statement with an error is the error
reported.
Compilation is the process of converting the code into a language
that the computer understands-machine language. When compiling a
program using a compiler, the compiler checks for syntactical
(grammatical) errors. In code and lists all the errors on the screen. The
errors are rectified and the program is recompiled to get the machine
language code. Java compiler compiles the code to a byte code that is
understood by the Java environment.
Bytecode is result of compiling a Java program. This code can be
executed on any platform. In other words, due to the byte code compilation
process and interpretation by a browser, Java programs can be executed
on a variety of hardware and operating systems. The only requirement is
that the system should have a Java-enabled Internet browser. A Java
compiler is written in Java and the run time environment, the interpreter, is
written in C. The Java interpreter can execute Java code directly on any
machine on which a Java interpreter has been installed.
A Java program can run on any machine that has a Java interpreter.
The bytecode supports connection to multiple databases. Java code is
portable. Therefore, other people can use the programs that you write in
Java even if they have different machines with different operating systems.
Due to strong type checking done by Java on the user’s machine,
any changes to the program are tagged as errors and the program will not
execute.
Java programs are comparable in speed to the programs written in
other compiler-based languages like c and C++. Java is faster than other
interpreter-based languages like BASIC since it is compiled and
interpreted.
Multithreading is the ability of an application to perform multiple tasks
at the same time. For example, when you play a game on your computer,
one task of the program ia to handle sound effects and another to handle
screen display. A single program accomplishes many tasks simultaneously.
A Java program can consist of many modules that are written by
many programmers. These modules may undergo many changes. Java
makes interconnections between modules at the run-time, which easily
avoids the problems caused by the change of the code used program. Java
is thus dynamic.
A few types of Java applications are listed below:
Applications that do not use graphical user interface (GUI) –they are
similar to traditional programs written in C and C++.
Applications using GUI. These applications are used in windows
environment.
Applets-These programs run on a web page and require a Java
enabled browser like Internet Explorer or Netscape Navigator.
Packages-Packages are collections of classes that can be shared by
applications and applets. They are similar
to the libraries provided by other language like C++. Java provides
many packages lie lang and u