UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What are the criteria for keyword synchronized in Java to work?

Asked by Last Modified  

2 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Tutor

Synchronized keyword allows only one thread to pass through it. It is used in multithreaded environment to maintain ACID(Atomicity, Consistency, Isolation, Durability) property. We can use synchronized keyword in 2 ways. class level and object level. It is implemented in the method or synchronized block....
read more
Synchronized keyword allows only one thread to pass through it. It is used in multithreaded environment to maintain ACID(Atomicity, Consistency, Isolation, Durability) property. We can use synchronized keyword in 2 ways. class level and object level. It is implemented in the method or synchronized block. What it does is t that when a thread comes to a synchronized block or method the thread acquires the lock of the object. This does not allow the other thread to execute which is not having lock. E.g of implementation read less
Comments

IT Professional Trainer with 13 years of experience in IT industry + Academics

For threads mutual exclusion, we need to achieve synchronization between threads. Till one thread will not complete its execution ,no any other thread can enter into the process. you can achieve synchronization by defining method as synchronized or object defined as synchronized.
Comments

Related Questions

What is difference between C language and Java language?
C is more procedure-oriented while JAVA is data-oriented. Java is an Interpreted language while C is a compiled language. C uses the top-down {sharp & smooth} approach while JAVA uses the bottom-up...
Poonam
0 0
5
Can u explain init() method is used in servlet for initialization then constructor also there for initializing variables.then what makes the difference between init() and default constructor in servlets?
Using init() only advisable than default constructor because we cannot initialize servlet using constructor because servlets are not directly instantiated by javacode, instead container create instance...
Anwar
Should I learn a Python course online or offline? What are some good Python training classes?
If it is that much simple as i have been said to learn from the internet then everyone would have been developer according to me you should learn offline by some good institute. like Praxware technologies...
Neha
0 0
8
Between Java and Python, which one is better to learn first and why?
Both the development programs come with their strong suits. While Java allows you to enjoy the cross-platform support, Python helps you execute on at least ten different operating systems. It would help...
Priyanka
0 0
5
What is the general syllabus covered in core Java training from any institution?
you can check the syallbus on http://felix-its.com/java-training-pune/
Shiv Kohli
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Spring - Dependency Injection (DI)
Spring - Dependency Injection (DI) DI is a framework which provides loose coupling in code. Here loose coupling means no hard coding of the object. Instead of hard coding, we will be injecting these object...

Differences Between HashMap vs HashSet In Java.
HashSet HashMap HashSet implements Set interface. HashMap implements Map interface. HashSet stores the data as objects. HashMap stores the data as key-value pairs. HashSet...

History Of Java
Java history is interesting to know. The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such...
V

Access Specifiers â?? Private, Protected, Public, Package-private
Access level modifiers determine whether other classes can use a particular field or invoke a particular method. The following table shows the access to members permitted by each modifier. Access...

Features Of Java
There is given many features of java. They are also known as java buzzwords. The Java Features given below are simple and easy to understand. i. Simple ii. Object-Oriented iii. Portable iv. Platform...

Recommended Articles

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more