Sunday, June 12, 2011

JAVA FAQ's

1) How Java Relates to C and C++

Java is directly related to both C and C++. Java inherits its syntax from C. Its object model is adapted from C++.


Second, Java’s designers did not “reinvent the wheel.” Instead, they further refined an already highly successful programming paradigm. The modern age of programming began with C. It moved to C++, and now to Java.

This makes it easy for a C/C++ programmer to learn Java and, conversely, for a Java programmer to learn C/C++.


2) What are  Java Applets
An applet is a special kind of Java program that is designed to be transmitted over the Internet and automatically executed by a Java-compatible Web browser. Furthermore, an applet is downloaded on demand.

3) Java Security :

Java confines a Java program to the Java execution environment and not allowing it access to other parts of the computer.

Frankly, the ability to download applets with confidence that no harm will be done to the client computer is the single most important aspect of Java.

4)   To address the issues of portability and security, why was it necessary to create a new computer language such as Java; couldn’t a language like C++ be adapted? In other words, couldn’t a C++ compiler that outputs bytecode be created?

While it would be possible for a C++ compiler to generate bytecode rather than
executable code, C++ has features that discourage its use for the creation of applets—the most important feature being C++’s support for pointers. A pointer is the address of some object stored in memory. Using a pointer, it would be possible to access resources outside the program itself, resulting in a security breach. Java does not support pointers,thus eliminating this problem.



































No comments:

Post a Comment