Posts by Krishna Lakhi

Author Biographical Info: Not available

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

Conversion of String to Enum in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how to convert a string to an enum data type in Java. Enum in Java Enum is a special data type in Java in which it’s field consis.... Read More

How to check if the given date is valid or not in Java

By Krishna Lakhi

Hey Everyone! In this article, we will learn how we can check if a given date is valid or not in Java. For a given date to be valid we have to check two conditions which are as fol.... Read More

How to Send Email in Java using javax.mail API

By Krishna Lakhi

Hey Everyone! In this article, we will learn how we can send an email using the Gmail Smtp server as host. To send an email using Java first download the javax.mail API from the li.... Read More

How to validate Email Address in Java

By Krishna Lakhi

Hey Everyone! In this article, we will see how we can validate an Email address provided by the user in Java. Email Address Validation in Java Email Address in Java can be validate.... Read More