Friday, August 13, 2010

Advanced Java - 2

21. Static binding occurs at
Compile Time
Runtime
Both at compile and runtime.



22. Virtual Methods are default in
Java

C

C++ - Answer

All

23. Storage space in java is of the form
Stack

Queue

Heap

List

24. What is java code embedded in a web page known as
Applets

Servlets

scriptlets

snippets

25. Which of the following attributes are compulsory with an <applet> tag?.
code,height & width.

26. What does 'CODEBASE' in an applet tag specify?.
Files absolute path.

27. What are AccessSpecifiers & Access Modifiers.
Access Specifiers: Give access previleges to outside applications or users. They are :-

Public: any one can access

private:only class members can access.cannot be inherited.

protected: can be accessed by a derived class.

default: can access data from the current directory.
Access Modifiers: Which gives additional meaning to data, methods and classes.

(i) Final: cannot be modified at any point of time.

28. 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

29.Hostile Applets:
It's 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.

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

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

32.Java Primitive Data Types:
Byte-8-bit

short-16-bit

int-32-bit

Long-64-bit

Float-32-bit floating point

Bouble-64-bit floating point

Char-16-bit Unicode

33.What is a unicode?
Unicode is a standard that supports International Characters.

34. What are blocks?.
They are statements appearing within braces {}.

35. What are types of Java applications?.
(i) Standalone applications(No browser).

(ii) Applets(Browser).

36. What is the method that gets invoked first in a stand alone application?.
The main()method.

37. What is throwing an Exception?.
The act of passing an Exception Object to the runtime system is called Throwing an Exception.

38. What are the packages in JDK?.
There are 8 packages
(i) java.lang

(ii)java.util

(iii)java.io

(iv)java.applet

(v) java.awt

(vi) java.awt.image

(vii)java.awt.peer

(viii)java.awt.net

39. What is a thread?.
Its a single sequential stream of execution.

40. 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.

No comments:

Post a Comment