Get Season By Month And Date In Java November 14, 2013 Java Utilities Edit The following illustrates getting season name by month and date in Java. import java.util.*; import java.text.*; class CheckSeason { ... Read More
Get Currency Symbol By Country In Java November 13, 2013 Java Utilities Edit The following example illustrates getting currency symbol or code by country code in Java. This tiny program, which is not more than 2 line... Read More
How To Shuffle Elements In Arraylist? November 12, 2013 Collections Framework, Java Utilities Edit Here is a single line code that lets you shuffle elements in an ArrayList. The method shuffle() in the Collections class lets you do this... Read More
How To Convert An Array To List? October 25, 2013 Arrays, Java Utilities Edit Here is how you can convert an array to a list using the simple Arrays.asList() method. This is a simple generic method that takes in an... Read More
Sort Elements In Arraylist, Linkedlist, Vector May 28, 2013 Collections Framework, Java Utilities Edit Let us sort elements in ArrayList in the increasing order. Not only ArrayList, but also LinkedList. The code for both of them is same and... Read More
How To Convert Arraylist Into Array May 21, 2013 Collections Framework, Java Utilities Edit Here is a question about converting ArrayList to an array. We can do this using two simple methods in the java.util.ArrayList . These me... Read More
Printing A Right Triangle In Java April 10, 2013 Java Utilities, Tricks Bag Edit Let us print a right angled triangle on the console in Java. Doing this is very simple if you put a very little effort. The following cod... Read More
Remove Duplicate Elements In A Vector March 28, 2013 Java Utilities Edit Vector in java.util package is used as a dynamic array. Any no.of elements can be added to the vector. It might be essential sometimes t... Read More
Difference Between Capacity() And Size() In Vector December 28, 2012 Java Utilities, Vector Edit The difference between capacity() and size() in java.util.Vector is that capacity() returns how many elements it can store whereas the size... Read More
Binary Search For Integer In Array December 26, 2012 Arrays, Java Utilities Edit The following example illustrates binary search of int in array. import java.util.*; class SearchInt { public static void main... Read More
Subtract Elements In Array In Java November 16, 2012 Arrays, Java Utilities Edit An example code on subtracting elements in array in Java in decreasing order in 3 main steps. This simple logic can also be used on any pro... Read More
Sort Array In Increasing Order In Java November 16, 2012 Arrays, Java Utilities Edit An example code on sorting an array of (any numeric datatype) in increasing order in a single statement. Sorting Array in Increasing ... Read More
Stringtokenizer In Java Example November 15, 2012 Java Utilities Edit An example on using java.util.StringTokenizer for counting no.of tokens split by a delimeter, using the methods hasMoreTokens() , nextToke... Read More
Generate Random Integer In Specific Range In Java October 31, 2012 Java Utilities Edit Ranging random integers not found in java.util.Random An example on generating random integers between a specified range . Example ... Read More