Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Java Interview Questions - Page 5

Question: How to create multithread in a program? Answer: You have two ways to do so. First, making your class "extends" Thread class. Second, making your class "implements" Runnable interface. Put jobs in a run() method and call start() method to start

Tutorial Details:

Question: Can Java object be locked down for exclusive use by a given thread?

Answer: Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it

Question: Can each Java object keep track of all the threads that want to exclusively access to it?
Answer: Yes

Question: What state does a thread enter when it terminates its processing?
Answer: When a thread terminates its processing, it enters the dead state.

Question: What invokes a thread's run() method?
Answer: After a thread is started, via its start() method of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.

Question: What is the purpose of the wait(), notify(), and notifyAll() methods?
Answer: The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to communicate each other.


 

Rate Tutorial:
http://www.roseindia.net/interviewquestions/java-interview-questions-5.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Java Interview Questions - Page 5

View Tutorial:
Java Interview Questions - Page 5

Related Tutorials:

The Volano Report: Which Java platform is fastest, most scalable? A JavaWorld exclusive! - JavaWorld - Mar
The Volano Report: Which Java platform is fastest, most scalable? A JavaWorld exclusive! - JavaWorld - March 1999
 
Programming Java threads in the real world, Part 5 - JavaWorld - February 1999
Programming Java threads in the real world, Part 5 - JavaWorld - February 1999
 
Apple announces Java 2 plans at MacWorld
Apple announces Java 2 plans at MacWorld
 
JDBC drivers in the wild - JavaWorld July 2000
JDBC drivers in the wild - JavaWorld July 2000
 
Object mobility in the Jini environment - JavaWorld January 2001
Object mobility in the Jini environment - JavaWorld January 2001
 
Clean up your wire protocol with SOAP, Part 1 - JavaWorld March 2001
Clean up your wire protocol with SOAP, Part 1 - JavaWorld March 2001
 
Study guide Achieve strong performance with threads Part 1
Study guide Achieve strong performance with threads Part 1
 
Jini's relevance emerges, Part 2
Jini's relevance emerges, Part 2
 
Effort on the edge, Part 1
Effort on the edge, Part 1
 
Taming Tiger, Part 3
J2SE 5—code named "Tiger"—is the most significant revision to the Java language since its original inception. Tarak Modi's primary goal with his three-part series on Tiger is to familiarize readers with J2SE 5's most important additions and show how t
 
Creating Varargs in Java 1.5 Tiger
Creating Varargs in Java 1.5 Tiger In this excerpt from Chapter 5 of the book, Brett and David cover how to create and iterate over variable-length argument lists (better known as varargs), which will have you writing better, cleaner, more flexible code
 
Drools
Drools is an augmented implementation of Forgy's Rete algorithm tailored for the Java language. Adapting Rete to an object-oriented interface allows for more natural expression of business rules with regards to business objects.
 
JLisa - A Rule Engine for Java
JLisa is a powerful framework for building business rules accessible to Java and it is compatible with JSR94 V, the JavaTM Rule Engine API JLisa is more powerful than Clips because it has the expanded benefit of having all the features from common lisp a
 
Tiger and Beyond, the Future of the Java Platform
Part Two of an interview with Sun Microsystems' Sun Fellow, Graham Hamilton, explores Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) and the future of the Java language.
 
Chat Transcript: Project Looking Glass
Where did the original Looking Glass idea come from? Read the answer to this and other interesting questions about Project Looking Glass, a project that explores the next generation (3-dimensional) desktop.
 
Producing Enterprise Architecture:
A Conversation with Sun's Dan Hushon, Part Two In the final part of a two-part interview, Sun Microsystems' Dan Hushon talks about adaptive enterprise architectures, the market for developers, Java Centers of Excellence, and loosely coupled components.
 
Chat Transcript: New Language Features in J2SE 5.0
Java 2 Platform, Standard Edition (J2SE) 5.0. includes the biggest set of language changes since the original release of the Java programming language.
 
Asking "Why" at Sun Laboratories: A Conversation with Director, Glenn Edens
Sun Laboratories Director, Glenn Edens, discusses new research developments in the Java language and the gratifications and trials of running a research lab.
 
Core Java Interview Questions!
Core Java Interview Questions! Core Java Interview Questions Question: What is transient variable? Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written
 
Collection of Large Number of Java Interview Questions!
Collection of Large Number of Java Interview Questions! Collection of Large Number of Java Interview Questions The Core Java Interview Questions The Jakarta Struts Interview Questions
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.