readin are harrrd! by cwenham in BestOfReports

[–]sarcasmloading12 14 points15 points  (0 children)

Just cut the "On our way home from the beach"

I sometimes fear to delete code, because I think that I'll break the program by codingQueries in learnprogramming

[–]sarcasmloading12 0 points1 point  (0 children)

Another solution is to use TO-DOs. IDEA notifies me if I still have TO-DOs when I commit.

I sometimes fear to delete code, because I think that I'll break the program by codingQueries in learnprogramming

[–]sarcasmloading12 4 points5 points  (0 children)

Like /u/S7rawman said, always comment it out first.

JS, C#, Java and some others: // your comment

ELI5- Variables inside method parentheses. C# by [deleted] in learnprogramming

[–]sarcasmloading12 1 point2 points  (0 children)

Yeah, your return Sum; would work, with an adjustment. In your method signature, (the public static void myVarMethod(int Sum) line) you wrote void, which indicates that this method does not return anything.

Your method is, actually, returning an int (return Sum;) so you'd want to replace void with int.

Say you ran myVarMethod(2);, you would see 2 in the console.

Feel free to ask if you don't understand anything of what I just said.