4 ms·
public class filter { public static void main (String [] args) { System.out.println("2, 4"); } } FTFY, While it may be fun that show off wit
by huherto 16y ago
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
- sfphotoarts 16y agothis misses the point, if you hard-code the result then still the other languages are more concise.
- jbri 16y ago"Enterprise" developer at work here, folks!
- aroberge 16y agoThe 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.