- Monday, June 29, 2009, 14:08
- Java
- 6,105 views
A lot of time I have to convert ArrayList to Arrays in my Java program. Although this is a simple task, many people don't know how to do this and end up in iterating the java.util.ArrayList to convert it into arrays. I saw such code in one of my friends work and I thought to share this so that people don't end up writing easy ...
Full story
- Friday, June 26, 2009, 20:11
- Java
- 1,248 views
Few days back I came to know about a different way of initializing collections and objects in Java. Although this method of initialization has been there in Java since quite a few years now, very few people actually knows about it or have used it in their code. The technique is called Double Brace Initialization technique ...
Full story
- Friday, May 15, 2009, 21:49
- Java, Tutorial
- 3,735 views
I think I am late for writing about varargs. The feature of variable argument has been added in Java 5 since its launch. Still I will write something about varargs.
varargs has been implemented in many languages such as C, C++ etc. These functionality enables to write methods/functions which takes variable length of arguments. For example the ...
Full story
- Wednesday, May 13, 2009, 16:24
- Featured, Java, Tutorial
- 15,086 views
Following are few very useful Java code snippets for Java developers. Few of them are written by me and few are taken from other code reference. Feel free to comment about the code and also add your code snippet.
1. Converting Strings to int and int to String
String a = String.valueOf(2); //integer to numeric string
int ...
Full story