Sunteți pe pagina 1din 5

JAVA

1.Why is java often termed as a platform?

Ans:Platform is the environment in which programs


execute.Instead of interacting with the operating system
itself,java programs run on virtual machine provided by
java,therefore,java is often referred to as a platform also.

2.How can you say that java is both a programming language


and platform?

Ans:Like any other programming language,we can use java to


write or create various types of computer applications.the word
platform is generally used to refer to some combination of
hardware and system software.The java platform is a new
software platform designed to deliver and run highly
interactive,dynamic and secure applications on networked
computer systems.

3.What is byte code?

Ans:Byte code is a set of pseudo machine language instructions


that are understood y the JVM(java virtual machine) and are
independent of the underlying hardware.

4.How is java platform independent?

Ans:Java programs are compiled to form byte code,which is the


same on all platforms.Thus,java programs are platform
independent as they can be run on any machine on which
JVM(java virtual machine) is installed.

5.What is JVM?

Ans:JVM or java virtual machine is an abstract machine that


hides underlying operating system from java application and
executes the compiled java programs,thus, making java
programs independent of any platform.

6.Describe ordinary compilation process.

Ans:In the ordinary compilation process,the source code is


translated directly to the native machine language which makes
the compiled programs platform independent.

7.Describe java compilation.

Ans:The java compiler translates java programs to byte


code,which is the same for all platforms thus,making compiled
java platform independent.

8.How is java byte code executed?

Ans:Java byte code is executed by the JVM,which reads each


instruction of the compiled java program one-by-one nad
translates it to the corresponding native language and executes
it.

9.What are java APIs?

Ans:The java APIs(java application programming


interface)consists of libraries of precompiled code that
programmers can use in their applications.

10.What si an initial class?

Ans:A java program can contain many classes.But only one class
in a java program can contain the main method.This class is
called the initial class.

11.What is the significance of the method main()?

Ans:All java applications begin their execution from the main


method.If no main method is there in a java program,then no
execution takes place.

12.What do you know about Blue J?

Ans:Blue J is a java development environment.It is an


IDE(Integrated Development Environment) which includes an
editor,de-bugger and viewer.It offers an easy way to run java
programs and view documentation.

13.Name two types of java programs.

Ans:The two types of java applications are internet applets and


stand-alone applications.

14.How are internet applets different from stand-alone


applications of java?

Ans:Internet applets cannot run on their own.They run from


within a web browser whereas java stand-alone applications can
run independently on any platform.

15.Java is both a programming language and a


platform.Comment.

Ans:Java can be used to write various types of computer


applications,thus,it is a full-fledged programming language.But
apart from being a programming language,java provides a
runtime environment that simulates a hardware/software
platform.Thsi virtual platform called JVM interprets java
programs from byte code to native machine language and
controls their execution.Thus,java is both a programming
language and a platform on which programs written in the java
language execute.

16.How are byte code and platform independence interlinked?

Ans:All the java programs are translated on compilation.Byte


code instructions are pseudo-machine language instructions i.e.
these instructions have one-to-one mapping with actual machine
language instructions.but what makes byte code different is that
it is the same for all hardware/software platforms which means
that the instructions of a compiled java program are not
dependent on the platform on which they are compiled thus
making them platform independent.

17.What are the different features of java?

Ans:The features of java are as follows-


a)Write Once Run Anywhere(WORA):-
Compiled java programs can be run anywhere without making
any changes.
b)Light weight code:-
Because of advanced java API even complex applications can
be developed with very light code.
c)Security:-
Security features of java make java programs safe for the
platform on which they execute.
d)Built-in-graphics:-
This feature makes development of visual applications very
simple.
e)Object oriented language:-
Being an object oriented language java can be used to simulate
real world objects.
f)Supports multimedia:-
Ideally suited for integration of video,audio and animation in
stand-alone and internet- based applications.
g)Open product:-
Being an open product,java is freely available to all.

S-ar putea să vă placă și