Posts by Krishna Lakhi

Author Biographical Info: Not available

Extract Digits from a String in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to Extract Digits from a user-entered String in Java and then display each digit. I hope this post is going to be interesting and y.... Read More

How to convert String to BigDecimal in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to convert String to BigDecimal in Java. Before directly getting into the code let us first understand BigDecimal class in Java. Bi.... Read More

Take only Integer input from user in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn about how to accept only Integer input from user in Java. So let’s get started. There are several ways in which we can prompt the.... Read More

How to run a task every n seconds or periodically in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how we can execute or perform a particular task in Java every n seconds or periodically using the Timer and TimerTask classes. Before d.... Read More

Implement polling in Java with poll() method

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to implement polling with the help of poll() method java.util.Queue package in Java. First, let us study the Queue interface presen.... Read More

Java Program to detect USB Device

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to detect a USB device in Java that is inserted into a PC/laptop. We know that the external USB inserted into the PC/laptop is dete.... Read More

Printing nodes that don’t have sibling in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to find out the nodes in a given binary tree that does not have any sibling and print it in Java. Before directly getting into the .... Read More

How to calculate age from date of birth in Java

By Krishna Lakhi

Hey Everyone! In this tutorial, we will learn how to calculate age from Date of Birth in Java provided by the user as input. For this tutorial please consider using Java version 8 .... Read More