Convert String into date
In this example we are going to convert String into date. SimpleDateFormat is a concrete class for formatting the dates which is inside package "java.text.*" which have a date format which convert a string into Date format.
Super keyword in java
In this section we will discuss about the super keyword in java. Super is a keyword defined in java. Super is used to refer the variable, methods and constructor of the super or parent class.
Runnable interface in java
In this section we will learn about Runnable interface in java. In java thread are created by two ways, one by extending Thread class and another one by implementing Runnable interface.
clone method in Java
clone() method in Java is used to create and return copy of the object. Clone() method is used in class where Cloneable interface is implemented but throws a CloneNotSupportedException where a Cloneable interface is not implemented.
Vector in java
Vector in java implements dynamic array. It is similar to array and the component of vector is accessed by using integer index. Size of vector can grow or shrink as needed, by adding and removing item from vector.
Java Queue example
Queue Interface is part of java.util package. Queue generally works on FIFO (First In First Out) in ordering elements. In FIFO, new element is added at the end while in other cases ordering properties has to be specified. Queues are bounded which means that number of elements are restricted in it.
How to declare String array in Java?
Following example will show you how to declare string array in java. There are many ways to declare an array and initialize them. We can use 'new' keyword to declare an array. However, an array can also be declared without the use of 'new' keyword.
Heap Sort in Java
Heap Sort in Java is used to sort integer values of an array. Like quicksort, insertion sort, bubble sort and other sorting methods, heap sort is used to sort an unsorted list.