I was looking for a quick easy way to format a int into a string with two leading zeros. I found this https://stackoverflow.com/a/4377337/47690 answer and it looked like what I needed. So I implemented it as such
int i = 34; //could be any value but you get the idea
String.format("%03d", i);
But, Eclipse seems to moan about the fact that String.format requires an Object[] for its second parameter. What is going on here?
Check you project settings
you are probably in Java 1.4 which does not recognize vararg