r/java • u/[deleted] • Dec 30 '15
Thought you guys would like this
http://imgur.com/dbWeGaS36
u/dohaqatar7 Dec 30 '15
public class Reddit { //I'll start73
Dec 30 '15
}
40
u/dohaqatar7 Dec 31 '15
//what did I expect9
Dec 31 '15
[removed] — view removed comment
5
u/dohaqatar7 Dec 31 '15
public static void main(String[] args){5
u/Chemical_Studios Dec 31 '15
Scanner keyboard = new Scanner(System.in);-2
u/dohaqatar7 Dec 31 '15
String s=keyboard.nextLine();0
0
14
u/mokarbroj Dec 30 '15
private String date;
3
u/dohaqatar7 Dec 30 '15
public Reddit(){17
u/Audiblade Dec 30 '15
date = "So, do you want to, maybe, get dinner or something?...";9
u/dohaqatar7 Dec 30 '15
}12
u/forseti_ Dec 30 '15
public boolean repostChecker(Post post) {52
u/technotrader Dec 30 '15 edited Dec 30 '15
return true; // 98% hit rate, no need to compute4
0
0
2
1
Dec 30 '15 edited Dec 30 '15
[removed] — view removed comment
2
Dec 31 '15
Dear lord is that actually a thing?
1
1
-1
0
u/marcohu Dec 30 '15
/** Is this really valid Java? */ public synchronized byte toByteArray()[] { return new byte[0]; }5
u/Ek_Los_Die_Hier Dec 30 '15
No, mainly because your square brackets need to be after the byte not after the method name.
1
u/yawkat Dec 31 '15
They can actually be after the method name iirc, try it
1
u/Ek_Los_Die_Hier Dec 31 '15
Even if that is the case, I'm likely to shoot any developer in my team who does it.
2
u/marcohu Dec 31 '15
The method signature is actually taken from the Java 8 runtime sources...
It might be one of the least known syntax peculiarities of the Java language. I was totally unaware until I stumbled upon it by accident a few days ago.
1
u/Ek_Los_Die_Hier Dec 31 '15
Seriously? Yeah, well it's something that I think shouldn't be used, so probably for the best that it's not commonly know.
2
0
1
u/danO1O1O1 Dec 31 '15
public static void main(String[] args) {
0
1
1
-1
133
u/viciu88 Dec 30 '15
You can't start class name from digit.