KyaPoocha.com

Huge Collection of Interview Questions


Archive for January, 2007

How do you set security in applets? 

using setSecurityManager() method.  Read more »

What is the lifecycle of an applet? 

init() method - Can be called when an applet is first loaded start() method - Can be called each time an applet is started. paint() method - Can be called when the... Read more »

When do you use codebase in applet? 

When the applet class file is not in the same directory, codebase is used.  Read more »

How does applet recognize the height and width? 

Using getParameters() method.  Read more »

Are there any global variables in Java, which can be accessed by other part of your program? 

No, it is not the main method in which you define variables. Global variables is not possible because concept of encapsulation is eliminated here.  Read more »

What is daemon thread and which method is used to create the daemon thread? 

Daemon thread is a low priority thread which runs intermittently in the back ground doing the garbage collection operation for the java runtime system. setDaemon... Read more »

When you will synchronize a piece of your code? 

When you expect your code will be accessed by different threads and these threads may change a particular data causing data corruption.  Read more »

What is synchronization? 

Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.  Read more »

What are the states associated in the thread? 

Thread contains ready, running, waiting and dead states.  Read more »

What is the class and interface in java to create thread and which is the most advantageous method? 

Thread class and Runnable interface can be used to create threads and using Runnable interface is the most advantageous method to create threads because we need... Read more »

What are the methods for inter-thread communication and what is the class in which these methods are defined? 

wait (), notify () and notifyAll() methods can be used for inter-thread communication and these methods are in Object class. wait() : When a thread executes a call... Read more »

What is multithreading? 

Multithreading is the mechanism in which more than one thread run independent of each other within the process.  Read more »

What is the difference between process and thread? 

Process is a program in execution whereas thread is a separate path of execution in a program.  Read more »

What is the difference between Array and vector? 

Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.  Read more »

What is the difference between String and String Buffer? 

a) String objects are constants and immutable whereas StringBuffer objects are not. b) String class supports constant strings whereas StringBuffer class supports... Read more »

Page 1 of 912345»...Last »