Author Archive


Converting Milliseconds to Date in Java

Many Web Service specifications represent dates as number of milliseconds elapsed since 1st January 1970. This representation also enables us to store and transfer date values as long values. However when want to manipulate dates such as adding days or months, this long value is cumbersome to process. In such cases we want to work […]

5 Must Watch Videos for Experienced Android Developers

If you are an experienced Android developer, here are 5 must watch videos to improve your Android skills. These videos cover not only advanced Android programming techniques but also stuff such as best practices in development, use of various frameworks, handling user expectation when you app becomes a Play Store success, etc. What makes these […]

Java Listing All Files In a Directory

One of the common file system needs during programming is to find all the files or subdirectories in a directory. In Java, it is pretty easy since java.io.File has simple methods to achieve this. The File class is capable of representing both files and directories. This enables us to handle them in identical fashion, but […]

Convert String to Date in Java

Java has a dedicated class for representing and manipulating dates. This full package name of this class is java.util.Date. However when we receive date from external sources such as web services, we receive them as a String. The format of this date string depends on the source of the data. Hence we require conversion from […]

Java program to find average of numbers in an array

One of the common numerical needs in programs is to calculate the average of a list of numbers. This involves taking the sum of the numbers and then dividing the result with the count of numbers.The following example illustrates the algorithm of finding average of a list of numbers, Numbers are 12, 45, 98, 33 […]