GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  General  >  Interests
Go To First  |  Previous Question  |  Next Question 
 Interests  |  Question 29 of 39    Print  
What are synchronized methods and synchronized statements?
Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.



  
Total Answers and Comments: 0 Last Update: N/A   
  
 Sponsored Links

 

No answers are posted for this question yet.
Be the first to answer it!


 Related Questions

By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then 
Latest Answer : static methods are class methods. in which we can use only static data varibles of any calss of the program. these methods are invoke with out create objects of corresponding the class. ...

virtual methods are used to use the polymorhism feature in C++. Say class A is inherited from class B. If we declare say fuction f() as virtual in class B and override the same function in class A then 

Two methods may not have the same name and argument list but different return types. 

Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions 

If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available. 

Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized 

There is no method in the Serializable interface. The Serializable interface acts as a marker, telling the object serialization tools that your class is serializable. 

There are two methods in the Externalizable interface. You have to implement these two methods in order to make your class externalizable. These two methods are readExternal() and writeExternal(). 

When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject()two methods to control more complex object serailization process. 
Latest Answer : Java gives you control over the serialization process through the java.io.Externalizable interface. The java.io.Externalizable interface extends the java.io.SerialiJava gives you control over the serialization process through the java.io.Externalizable ...


 Sponsored Links

 
Related Articles

How ERP Improves General Ledger Capacity

How ERP Improves General Ledger Capacity Flexibility quickness and efficiency are the pillars and needs of the modern organization In order to fulfill all the requirements that the market imposes ERP has become an useful utility The general ledger tasks are nowadays one of the most important activit
 

C++ Decision Making Statements

C Decision Making Statements In this C tutorial you will learn about decision making statements if statement if… else statement switch statement conditional operator along with syntax and examples mosgoogle center Decision making is an important concept in any programming language and to
 

exit and return statements

  How does the exit () and return () differ exit () is used to exit the program as a whole. In other words it returns control to the operating system. After exit () all memory and temporary storage areas are all flushed out and control goes out of program. In contrast, the return () stateme
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

JavaScript Window Object Timeout Methods

JavaScript Window Object Timeout Methods In this JavaScript tutorial you will learn about setTimeout clearTimeout and open methods of window object along with syntax usage and examples for each method mosgoogle center setTimeout The setInterval method of Window object is used to call a function or
 

JavaScript Document Object Methods Part II

JavaScript Document Object Methods Part II In this JavaScript tutorial you will learn about document object methods getElementsByTagName getSelection handleEvent releaseEvents routeEvent write writeln along with syntax examples and brief explanation mosgoogle center getElementsByTagName The the getE
 

JavaScript Document Object Methods Part I

JavaScript Document Object Methods Part I In this JavaScript tutorial you will learn about methods of document object along with syntax and examples This section covers captureEvents open close getElementById getElementsByName methods with explanations for each method mosgoogle center Methods of d
 

JavaScript History Object Properties and Methods

JavaScript History Object  Properties and Methods In this JavaScript tutorial you will learn about history object properties and methods length current next previous properties back forward and go methods along with syntax and examples mosgoogle center The history property has the return v
 

JavaScript Array Object Methods – Part II

JavaScript Array Object Methods Part II In this JavaScript tutorial you will learn about on array object methods slice splice toString shift and unshift methods along with general syntax and examples mosgoogle center slice By using the methods of the array object the programmer is able to retriev
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape