Wednesday, April 14, 2010

2.) Introduction to JAVA Programming

a.) History
James Gosling initiated the Java language project in June 1991 for use in one of his many set-top box projects. The language, initially called Oak after an oak tree that stood outside Gosling's office, also went by the name Green and ended up later renamed as Java, from a list of random words. Gosling aimed to implement a virtual machine and a language that had a familiar C/C++ style of notation.

b.) JAVA Technology
  • Programming Language - a programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create <>that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication.

  • Development Environment - in integrated development environment (IDE) also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development.

  • Application Environment - java technology applications are typically general-purpose
    programs that run on any machine where the Java runtime
    environment (JRE) is installed.
There are two main deployment environments:
1. The JRE supplied by the Java 2 Software Development Kit (SDK) contains the complete set of class files for all the Java technology packages, which includes basic language classes, GUI component classes, and so on.
2. The other main deployment environment is on your web browser. Most commercial browsers supply a Java technology interpreter and runtime environment.
  • Deployment Environment - as a development environment, Java technology provides
    you with a large suite of tools:
- a compiler - an interpreter - a document generator - a class file packaging tool

c.) JAVA Features

  • Java Virtual Machine - a Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture. has claimed there are over 4.5 billion JVM-enabled devices.
  • Garbage Collection - responsible for freeing any memory that can be freed. This happens automatically during the lifetime of the Java program.
    –programmer is freed from the burden of having to deallocate that memory themselves.
  • Code Security - Code security is attained in Java through the implementation of its Java Runtime Environment (JRE).
    JRE – runs code compiled for a JVM and performs class loading (through the class loader), code verification (through the bytecode verifier)
    and finally code execution.
d.) Phases of Java Programming

e.) Difference between JAVA application and JAVA applets

In simple terms, an applet runs under the control of a browser, whereas an application runs stand-alone, with the support of a virtual machine. As such, an applet is subjected to more stringent security restrictions in terms of file and network access, whereas an application can have free reign over these resources.

Applets are great for creating dynamic and interactive web applications, but the true power of Java lies in writing full blown applications. With the limitation of disk and network access, it would be difficult to write commercial applications (though through the user of server based file systems, not impossible). However, a Java application has full network and local file system access, and its potential is limited only by the creativity of its developers.

f.) What makes JAVA an object oriented programming language?

Java is called an Object Oriented Programming Language because many of the object oriented programming concepts are implemented in Java.

Some concepts are:
1. Class
2. Object
3. Inheritance
4. Encapsulation
5. Polymorphism
6. Abstraction

No comments:

Post a Comment