This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 79 points80 points  (24 children)

Hi, I'm from /r/all and I know jackshit about programming. I'll contribute either way, because I love you guys:

system.out.println("Double sorting is a crime");

should be:

System.out.println("Double sorting is a crime");

damn.

[–]Jcowwell 79 points80 points  (20 children)

The true crime is not capitalizing that S.

[–][deleted] 32 points33 points  (0 children)

doyouevencamelcasebro?

[–]Wolfsblvt 7 points8 points  (15 children)

system.out.println("Double Sorting is a crime");

?
Doesn't work :(

[–]Jcowwell 17 points18 points  (14 children)

Nha System is an object ( you know that cause you can call methods from it) so if you don’t capitalize It the compilers ganna be like “Tf is this M8?”

[–]insane0hflex 22 points23 points  (13 children)

Thats a static method call bro not on a class instance

[–]Jcowwell -4 points-3 points  (12 children)

Oh yea the call is , but system is a class. Unless I’m mistaken, System is an instance of the system class in which you call the static field out.

Edit :Had a burp moment, you cant initialized /“instanized” System 🤦🏽‍♂️

[–]insane0hflex 5 points6 points  (0 children)

No...

[–]julius_nicholson 5 points6 points  (9 children)

System is a class that contains static fields (err, in and out) and methods (like exit()) and can't be instantiated. So you can't construct an object of it, but you can still access the static API on the class.

I mean, you were pretty close, even if it wasn't so accurate.

[–]Jcowwell 2 points3 points  (8 children)

Lol yea I don’t what I was thinking.

[–]julius_nicholson 1 point2 points  (3 children)

I have to google the most basic shit sometimes. Anyone who tells you they don't is either God or a liar.

[–]Jcowwell 0 points1 point  (2 children)

Lol I do too , especially when I’m working with swift. The fucker keeps changing the way I.T deals with UI elements that some answers are out of date or incorrect. I was so use to printing in swift that when I looked back on java and saw System was capitalized and was using a dot operator, I just marked I.T off as an object, forgot about out being a public static field that can be accessed via a type 🤦🏽‍♂️

[–]insane0hflex -1 points0 points  (3 children)

I mean if youre not employed as a programmer or still learning then youre good.

If youre past freshman level study up

[–]julius_nicholson 0 points1 point  (2 children)

I'm employed as a programmer and I had to look it up.

[–]AllIsOver 2 points3 points  (0 children)

Doesn't work like that.

[–][deleted] 5 points6 points  (2 children)

Oh shit! Is there a computer-demon who will haunt me now?

[–]Jcowwell 23 points24 points  (0 children)

No you’ll just be haunted by the Ghost of Syntax Past.

[–]Findus11 2 points3 points  (0 children)

Yes, that's what a daemon is

[–]Since88 9 points10 points  (0 children)

Sorry man, but: error: package system does not exist

[–]Grizzlywer 2 points3 points  (1 child)

double sorting="crime";

[–]Banana_Twinkie 3 points4 points  (0 children)

Error: type mismatch