Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is general-purpose, concurrent, class-based, and object-oriented, and is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is considered by many as one of the most influential programming languages of the 20th century, and is widely used from application software to web applications.
B.) JAVA TECHNOLOGY
a.) PROGRAMMING LANGUAGE
designed to maximize programmer productivity by providing tightly-knit components with similar user interfaces. This should mean that the programmer has much less mode switching to do than when using discrete development programs.
c.) APPLICATION ENVIRONMENT
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 programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication.
b.) DEVELOPMENT ENVIRONMENT
An 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.
b.) DEVELOPMENT ENVIRONMENT
An 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.
designed to maximize programmer productivity by providing tightly-knit components with similar user interfaces. This should mean that the programmer has much less mode switching to do than when using discrete development programs.
c.) APPLICATION ENVIRONMENT
Java technology applications are typically general-purpose programs that run on any machine where the Java runtime environment (JRE) is installed.
d.) DEPLOYMENT ENVIRONMENT
There are two main deployment environments:
of class files for all the
browsers supply
d.) DEPLOYMENT ENVIRONMENT
There are two main deployment environments: First, 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. The other main deployment environment is on your web browser. Most commercial browsers supply a Java technology interpreter and runtime environment.
C.) JAVA FEATURES
a.) JAVA VIRTUAL MACHINE
enables a set of computer software programs and data structures to use a virtual machine 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.
b.) GARBAGE COLLECTION
relies on the observation that a previously allocated memory location that is no longer referenced by any pointers is no longer accessible to the application and is therefore reclaimable. The role of a garbage collector is to identify and recycle these inaccessible allocated memory chunks. There are two families of garbage collecting techniques -- reference counting and tracing.
Garbage collection thread :
– 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
c.) CODE SECURITY
JRE– runs code compiled for a JVM and performs class loading (throughthe class loader), code verification (through the bytecode verifier)and finally code execution
Class Loader– responsible for loading all classes needed for the Java program– adds security by separating the namespaces for the classes of thelocal file system from those that are imported from network sources– After loading all the classes, the memory layout of the executable isthen determined. This adds protection against unauthorized accessto restricted areas of the code since the memory layout isdetermined during runtime
Bytecode verifier– tests the format of the code fragments and checks the codefragments for illegal code that can violate access rights to objects
enables a set of computer software programs and data structures to use a virtual machine 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.
b.) GARBAGE COLLECTION
relies on the observation that a previously allocated memory location that is no longer referenced by any pointers is no longer accessible to the application and is therefore reclaimable. The role of a garbage collector is to identify and recycle these inaccessible allocated memory chunks. There are two families of garbage collecting techniques -- reference counting and tracing.
Garbage collection thread :
– 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
c.) CODE SECURITY
Code security is attained in Java through the implementationof its Java Runtime Environment (JRE).
JRE– runs code compiled for a JVM and performs class loading (throughthe class loader), code verification (through the bytecode verifier)and finally code execution
Class Loader– responsible for loading all classes needed for the Java program– adds security by separating the namespaces for the classes of thelocal file system from those that are imported from network sources– After loading all the classes, the memory layout of the executable isthen determined. This adds protection against unauthorized accessto restricted areas of the code since the memory layout isdetermined during runtime
Bytecode verifier– tests the format of the code fragments and checks the codefragments for illegal code that can violate access rights to objects
D.) PHASES OF JAVA PROGRAM
a.) WRITE
The easiest way to write a simple program is with a text editor. So, using the text editor of your choice, create a text file with the following text, and be sure to name the text file
b.) COMPILE
A program has to be converted to a form the Java VM can understand so any computer with a Java VM can interpret and run the program. Compiling a Java program means taking the programmer-readable text in your program file (also called source code) and converting it to bytecodes, which are platform-independent instructions for the Java VM.
c.) RUN
Once your program successfully compiles into Java bytecodes, you can interpret and run applications on any Java VM, or interpret and run applets in any Web browser with a Java VM built in such as Netscape or Internet Explorer. Interpreting and running a Java program means invoking the Java VM byte code interpreter, which converts the Java byte codes to platform-dependent machine codes so your computer can understand and run the program.
The easiest way to write a simple program is with a text editor. So, using the text editor of your choice, create a text file with the following text, and be sure to name the text file
ExampleProgram.java. Java programs are case sensitive, so if you type the code in yourself, pay particular attention to the capitalization. b.) COMPILE
A program has to be converted to a form the Java VM can understand so any computer with a Java VM can interpret and run the program. Compiling a Java program means taking the programmer-readable text in your program file (also called source code) and converting it to bytecodes, which are platform-independent instructions for the Java VM.
c.) RUN
Once your program successfully compiles into Java bytecodes, you can interpret and run applications on any Java VM, or interpret and run applets in any Web browser with a Java VM built in such as Netscape or Internet Explorer. Interpreting and running a Java program means invoking the Java VM byte code interpreter, which converts the Java byte codes to platform-dependent machine codes so your computer can understand and run the program.
C.) The Difference between Java Application and Java Applet
[] Java Application
D.) What makes Java an Object Oriented Programming Language
[] Java Application
Java applications have the majority of differences with the java applets. If we talk at the source code level, then we don't extend any class of the standard java library that means we are not restricted to use the already defined method or to override them for the execution of the program. Instead we make set of classes that contains the various parts of the program and attach the main method with these classes for the execution of the code written in these classes. The following program illustrate the structure of the java application.
[]Java appletis an applet delivered to the users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine (JVM), or in Sun's AppletViewer, a stand-alone tool for testing applets. Java applets were introduced in the first version of the Java language in 1995. Java applets are usually written in the Java programming language but they can also be written in other languages that compile to Java bytecode such as Jython
D.) What makes Java an Object Oriented Programming Language
Java is considered as an object oriented programming language because it uses "objects" – data structures consisting of datafields and methods together with their interactions – to design applications and computer programs. Java includes features such as data abstraction, encapsulation, modularity, polymorphism, and inheritance.
Even though Java has the look and feel of C++, it is a wholly independent language which has been designed to be object-oriented from the ground up. In object-oriented programming (OOP), data is treated as objects to which methods are applied. Java's basic execution unit is the class. Advantages of OOP include: reusability of code, extensibility and dynamic applications.
Even though Java has the look and feel of C++, it is a wholly independent language which has been designed to be object-oriented from the ground up. In object-oriented programming (OOP), data is treated as objects to which methods are applied. Java's basic execution unit is the class. Advantages of OOP include: reusability of code, extensibility and dynamic applications.
No comments:
Post a Comment