Pragati Engineering College: Department of Computer Science & Engineering
Pragati Engineering College: Department of Computer Science & Engineering
5 Q) Why is Java known to be multithreading ? How does it help Java in its performance
[4 M]
Answer:-
This can be explained well with the help of an example:
Consider a four-gas burner on which food is cooked. The cook, in order to save time, puts
milk to boil on one gas burner, rice on the other, makes chapattis on the third, and vegetable on
the fourth. The cook switches between all the items to be cooked so that neither of the items are
red-heated to lose their taste. He may lower/brighten up the gas as and when required. Here the
cook is the processor and the four items being cooked are threads. The processor (cook) switches
from one thread to another.
PRAGATI ENGINEERING COLLEGE
# 1-378, ADB Road, Surampalem, E.G.Dist., A.P. – 533 437
(Approved by AICTE, New Delhi & Affiliated to JNT University, Kakinada)
Ph: (08852) – 252233, 252234, 252235 ,Fax: (08852) – 252232
(Sponsored by Gayatri Educational Society, Kakinada)
6 Q) Discuss the tools available in JDK. How do they help in application development? [4
M]
Answer:-
TOOLS in JDK :
The tools available in JDK are split into the following categories :
Basic tools ( javac, java, javadoc, apt, appletviewer, jar, jdb, javah, javap, extcheck )
Security tools ( keytool, jarsigner, policytool, kinit, klist, ktab )
Internationalization tools ( native2ascii )
Remote Method Invocation (RMI ) tools ( rmic, rmiregistry, rmid, serialver )
JAVA IDL and RMI-IIOP tools ( tnameserv, idlj, ordb, servertool )
Java deployment tools ( pack200, unpack200 )
Java plug-in tools ( html converter )
Java Web start tools ( javaws )
Java Monitoring and Management Console ( jconsole )
Java Web services tools ( schemagen, wsgen, wsimport, xjc )
[ Part – B ]
7 Q) what is the importance of setting environment variables such as Path and Classpath?
[8 M]
Answer:-
It is not possible to run a Java program without modifying system environment variables ( such as
path and classpath ) or modifying the autoexec.bat.
Why to set Path variable?
The PATH environment variables needs to be set if you want to run the executables (
javac.exe, java.exe, javadoc.exe, etc) from any directory. If you want to find out the current value
of your PATH, then type the following at the DOS prompt:
C:\> path
Windows NT/XP/Vista/7 : It is preferable to make the following environment variables changes
in the Control Panel instead of the autoexec.bat file. Start the Control Panel, Select System, and
the edit the environment variables. In case of other recent versions of Windows, right click on the
MyComputer icon and select Properties, click on Environment. The System Properties window
appears. Select Path from the list of system variables and append the following path to existing
path : C:\PROGRAM FILES\JAVA\JDK.1.7\bin ( complete path of \bin ).
PRAGATI ENGINEERING COLLEGE
# 1-378, ADB Road, Surampalem, E.G.Dist., A.P. – 533 437
(Approved by AICTE, New Delhi & Affiliated to JNT University, Kakinada)
Ph: (08852) – 252233, 252234, 252235 ,Fax: (08852) – 252232
(Sponsored by Gayatri Educational Society, Kakinada)