Saturday, February 29, 2020

What is difference between wait and sleep in Java Thread?

Wait vs sleep in Java Differences between wait and sleep method in Java multi-threading is one of the very old questions asked in Java interviews. Though both wait and sleep put thread on waiting state, they are completely different in terms of behavior and use cases. Thread.sleep(long millis)...

Thursday, February 27, 2020

Database Transaction Tutorial in SQL with Example for Beginners

A database transaction is an important concept to understand while working in database and SQL. Transaction in the database is required to protect data and keep it consistent when multiple users access the database at the same time.  In this database transaction preparation we will learn what is a...

Wednesday, February 26, 2020

Difference between save vs persist and saveOrUpdate in Hibernate

Save vs. saveOrUpdate vs. persist in Hibernate Hibernate Session class provides a couple of ways to save an object into the database by methods like save, saveOrUpdate, and persist.  You can use either save(),  saveOrUpdate() or persist() based upon your requirement for persisting objects into the database. The...

Tuesday, February 25, 2020

How to Implement Thread in Java with Example

How to implement Thread in Java In my opinion, Thread is one of the most important features of Java programming language which helped it to become the most popular programming language. I remember, when I first started learning Java in one of the programming class in India how...

Monday, February 24, 2020

How to Convert Date to String in Java with Example

Some times we need to convert java.util.Date to string in java  may for displaying purpose I need it that while working on displaytag then I thought about this article  to list down various way of converting this in various ways, after some reading I found that SimpleDateFormat makes...

Friday, February 21, 2020

How to Stop Thread in Java Code Example

The thread is one of important Class in Java and multithreading is most widely used a feature,but there is no clear way to stop Thread in Java. Earlier there was a stop method exists in Thread Class but Java deprecated that method citing some safety reason. By default,...

Thursday, February 20, 2020

Difference between wait() and join method in Java thread

Though both wait() and join() methods are used to pause the current thread and have a lot of similarities they have different purposes. One of the most obvious differences between the wait() and join() method is that former is declared in java.lang.Object class while join() is declared in...

Wednesday, February 19, 2020

How to combine two Map in Java? Example

You can combine two maps in Java by using the putAll() method of java.util.Map interface. This method copies all the mappings from one Map to another, like, if you call it like first.putAll(second), then all mappings from the second Map will be copied into the first Map. Which...

Tuesday, February 18, 2020

10 Examples of ConcurrentHashMap in Java

Hello Java programmers, you might have heard about the ConcurrentHashMap class of java.util.concurrent package. If you don't let me tell you that ConcurrentHashMap is an important class in Java and you will often find yourself dealing with this class in a multithreaded and concurrent Java application. If you...

Monday, February 17, 2020

Difference between include directive, include action and JSTL import tag in JSP?

There are three main ways to include the content of one JSP into another: include directive JSP include action and JSTL import tag The include directive provides static inclusion. It ads content of the resource specified by its file attribute, which could be HTML, JSP or any other...

Sunday, February 16, 2020

Right Way to Create, Start and Stop a New Thread in Java

One of the most important task for a Java developer is to learn multi-threading and learn it correctly. There are more Java developers who know multi-threading incorrectly than the programmer who doesn't know at all. In order to learn it correctly, you need to start it from scratch,...

Saturday, February 15, 2020

Earn Oracle Java Certification and Boost Your Professional Life

Java Certification is one of the most desired Certifications in IT field. Earning a Java Certification will help you to get a dream job. Java Programming is the world's highest used language, no doubt about it. Everyday lot of individuals are coming to Java world because there is...

Friday, February 14, 2020

Difference between CountDownLatch and CyclicBarrier in Java Concurrency

Difference between CountDownLatch and CyclicBarrier in Java Both CyclicBarrier and CountDownLatch are used to implement a scenario where one Thread waits for one or more Thread to complete their job before starts processing but there is one difference between CountDownLatch and CyclicBarrierin Java which separates them apart and...

Pages (26)1234567 »