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

  import static com.google.common.collect.Lists.*;
  import static com.google.common.collect.Collections2.*;
  import com.google.common.base.*;
  public class AdmittedlyNotMuchBetter {
      public static void main(String[] args) {
        System.err.println(filter(newArrayList(1,2,3,4),new  Predicate<Integer>() { 
          public boolean apply(Integer input) {return input % 2 == 0;}
        }));
      }
  }
btw, how do you preserve source indentation in the comments? [edit: formatting, thanks]
Re:Why I absolutely love java by huherto on Tuesday February 08, 2011 @07:41PM (#2195635)
Re:Why I absolutely love java by rst on Tuesday February 08, 2011 @07:41PM (#2195634)
Put leading whitespace on the lines, with blank lines before and after.