Core java Archive

java.lang.NumberFormatException

In this post, we will see about Java.lang.NumberFormatException. java.lang.NumberFormatException occurs where you try to convert any non-numeric String to Number such as Integer, Double, Float or Long. This exception generally occurs when you get input …

Validate phone number in java

In this post, we will see how to validate phone number in java. Validate any international phone number as per E.123 E.123 is a standards-based recommendation by the International Telecommunications Union sector ITU-T. E.123 provides …

Validate email address in java

In this post, we will see how to validate email address in java. There are times when you have to validate email address provided by user. You might want to write your own logic to …

Java LocalDateTime to Date

In this post, we will see how to convert LocalDateTime to Date. Java 8 has introduced a lot of new APIs for Date and time. There can be many ways to convert Java LocalDateTime to …