I used to use C++, however after I learned a little Java I switched to it because I love the code generation and the warnings it generates.

 

Pass by value or by reference:

http://stackoverflow.com/questions/7893492/is-java-really-passing-objects-by-value

 

 

 Running Java program from command shell sometimes is not easy. Gradle helps you to do that. I went through these steps to get to this result: