Sample code To demonstrate the conversion of array T into ArrayList. Your underline object may String, Person or Any complex type. But while conversion you need to take care of big UnsupportedOperationException.
Some times there is requirement to store the Image File into database, rather than physical storage device. To store the image into database we need to use BLOB datatype. BLOB is used to store byte values. Mysql Offer four data types namely TINYBLOB, MEDIUMBLOB, BLOB, LONGBLOB
Recently I had Join Java discussion Group on Facebook, Two days back One of the member from that group requested me to help on the file upload functionality. So I have written this article to help those people who having same requirement in there projects.
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.
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