News for hackers. Stuff that matters.
Re:Why I absolutely love java by huherto on Tuesday February 08, 2011 @07:40PM (#2195630)

  public class filter {
    public static void main (String [] args) {
      System.out.println("2, 4"); 
     }
   }
FTFY, While it may be fun that show off with your favorite language, the Java version is intentionally complex.

Edit: In case you missed the point. This version is as absurd trying to be short as the other version is absurd trying to be long. Also, I can guarantee that an "Enterprise" version would be 200 lines long :-P

Re:Why I absolutely love java by jbri on Tuesday February 08, 2011 @07:45PM (#2195646)
"Enterprise" developer at work here, folks!
Re:Why I absolutely love java by aroberge on Tuesday February 08, 2011 @07:51PM (#2195665)
The other examples filter from an existing list, essentially used as a placeholder. It could be substituted with any other list and the code sample would work. Your example use some hardcoded values - strings at that, not integers - hence not the same thing at all.
Re:Why I absolutely love java by sfphotoarts on Tuesday February 08, 2011 @07:45PM (#2195645)
this misses the point, if you hard-code the result then still the other languages are more concise.