Tuesday, 29 March 2011

Basic Java Questions -1



What are the benefits of using Java Or Why JAVA?

The main benefits of using Java include the following:

1) Java programming language is very simple and object-oriented. It’s easy to learn and taught in many colleges and universities.

2) As mentioned above,Java application run inside a Java Virtual Machine and now all major operating systems are able to run Java including Windows,Mac OS and UNIX.

3) Write one and run anywhere,a java application runs on all java platforms

4) Java technologies have been improved by community involvement. This means it is suitable for most types of applications especially complex systems that are used widely in network and distributed computing

5) Java is also secure. Only Java applications that have permission can access the resources of the main computer. This means that the main computer is protected from virus attackers and hackers.

What is ClASSPATH?
CLASSPATH is an argument set on the Command Line or through Environment Variable, that tells the JVM where to look for the user defined classes and packages in Java Program.

What is JDK?
Java Development Kit (JDK) essentially a Java Platform, consisting of the API classes, a Java Compiler and the JVM Interpreter. JDK is used to compile java applications and applets.

What is Bytecode?
Bytecode is the form of instructions that the JVM executes. Bytecodes are the machine language of the JVM

What is Java Debugger?
Java Debugger helps in finding and fixing the bugs in Java Language programs. It is denoted as jdb.

What is Javadoc?
Sun Microsystems has provided a computer software tool known as Java doc. This tool is used to generate API documentation into HTML format from java source code.

What is Java Compiler?
Java Compiler (javac) is a computer program or set of programs which translates java source code into java bytecode. Once the bytecode is generated, it can run on any platform using Java Interpreter(JVM).

Whts is JVM or Java Interpreter?
Java virtual Machine is an implementation of the JVM Specification, interprets complied java binary code (java bytecode) for a computers processors so that it can perform a java programs instructors.
JVM is a piece of software that is responsible for running java programs.

What are the major differences between C++ and Java?
-Java doesn't support pointers.
-Java doesn't include structures or unions.
-Java doesn't support operator overloading.
-All the code in a java program is encapsulated within one or more classes.
-Java doesn't support mutliple inheritance.
-Java doesn't have destructors.
- It is not possible to declare unsigned integers in java.
In java,, objects are passed by reference only. In C++ objects may be passed by value or reference.

0 comments:

Post a Comment