Timeline for List of possible birth years of living humans
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
Aug 15, 2016 at 9:26 | comment | added | Shaun Wild |
@MH. is right, this code will not compile without the imports so you need to either new java.util.Date() or add the import. Also, why don't you shorten it further by replacing the method with a lambda expression?
|
|
Aug 11, 2016 at 19:41 | comment | added | MH. |
What version of Java is this? As far as I'm aware, getYear() gives you the year since 1900. That means that the current output would be [116, -3]. You'd have to add +1900 (5 bytes) in order to get the correct output. Also, Date requires an import (java.util.Date ), which would add to the byte count too.
|
|
Aug 11, 2016 at 14:33 | history | edited | Linnea Gräf | CC BY-SA 3.0 |
1 byte off. Thanks to @LeakyNun; added 33 characters in body
|
Aug 11, 2016 at 14:08 | comment | added | Leaky Nun |
void p(){for(int i=0;i<120;)System.out.println(new Date().getYear()-i++);}
|
|
Aug 11, 2016 at 14:00 | history | answered | Linnea Gräf | CC BY-SA 3.0 |