Most of the time we required to convert the java util date to java sql date.Pass the milliseconds time value to the constructor of java.sql.Date class.The java.util.Date class has the method getTime() which returns milliseconds time value. Or you can make it vice versa.
Object Serialization is used to maintain an Object State. Object serialization converts an object state into a binary format which can be persisted in file.To make a Java object serializable you implement the java.io.Serializable interface.
Recently I had given interview in one of the reputed organization, An interviewer gave me small assignment to count each word occurrence of input text. Actually he want to check which collection i am using while storing the data.
Today we are going to learn on Java recursion. We are going to calculate Factorial of given number using java recursion program. Before that we need to learn what is recursion ? Recursion is nothing but calling method itself, Its endless looping method calling till method stack is overflow or explode. To avoid this you need to define the exit point or exit condition , where method stop its recursion calling.
For the larger size project, its good approach to keep all spring bean definition in separate file. It will helps to manage the bean configuration in proper way. Its file to use single file when your application size is small. Let see how to load the multiple file using spring application context API
ParameterizedRowMapper implementation that converts a row into a new instance of the specified mapped target class.The mapped target class must be a top-level class and it must have a default or no-arg constructor.Lets have sample example to retrieve the Person list.
Java 5 add many features Like Generics, Type-Safe Enumerations, Automatic Boxing and Un - Boxing, Annotations, For/In loops, and Static Imports and so on, We will Each Feature with the help of below examples