Core Java - Interview Questions and Answers

51. Tools provided by JDK

(i) javac - compiler
(ii)java - interpretor
(iii)jdb - debugger
(iv)javap - Disassembles
(v) appletviewer - Applets
(vi)javadoc - documentation generator
(vii)javah - 'C' header file generator

Hostile Applets: Its an applet which when downloaded attempts to exploit your system's resources in an inappropriate manner.It performs or causes you to perform an action which you would not otherwise care to perform.

RemoteObjects: Objects that have methods that can be called accross virtual machines are Remote Objects.An object becomes Remote by implementing Remote Interface.

Compiling: Conversion of Programmer-readable Text into Bytecodes,which are platform independent,is known as Compiling.

52. What is the method that gets invoked first in a stand alone application?.

The main()method.

53. What is throwing an Exception?

The act of passing an Exception Object to the runtime system is called Throwing an Exception.

54. What are the packages in JDK?.

There are 8 packages
(i) java.lang(ii)java.util(iii) java.awt
(vi) java.awt.image(vii)java.awt.peer(viii)

55. What is runnable?

Its an Interface through which Java implements Threads.The class can extend from any class but if it implements Runnable,Threads can be used in that particular application.

56. What is preemptive and Non-preemptive Time Scheduling?

Preemptive: Running tasks are given small portions of time to execute by using time-slicing.
Non-Preemptive: One task doesn't give another task a chance to run until its finished or has normally yielded its time.

57. What is an abstract class?

class which cannot be Instantiated.

58. How many standard ports are available?


59. What are invisible components?

They are light weight components that perform no painting, but can take space in the GUI.

60. What are the restrictions imposed by a Security Manager on Applets?

i) cannot read or write files on the host that's executing it.
ii) cannot load libraries or define native methods.
iii) cannot make network connections except to the host that it came from
iv) cannot start any program on the host that's executing it.
v) cannot read certain system properties.
vi) windows that an applet brings up look different than windows that an application brings up.

Post a Comment

Mới hơn Cũ hơn