Typecasting : How to Convert ‘int’ to ‘String’ in JAVA
Typecasting, or type conversion, is a method of changing an entity from one data type to another. It is used in computer programming to ensure variables are correctly processed by a function. An example of typecasting is converting an integer to a…
What is Custom Exception in JAVA ?
What is Custom Exception in JAVA ? In Java, there are two types of exceptions – checked and unchecked exception. Here’s the summary : Checked – Extends java.lang.Exception, for recoverable condition, try-catch the exception explicitly, compile error.…
How to change date format in a String in JAVA
How to change date format in a String in JAVA The java.text.SimpleDateFormat class is used to both parse and format dates according to a formatting pattern you specify yourself. When parsing dates, the Java SimpleDateFormat typically parses the date from…