I'm a student at the Free University of Berlin. I enjoy hacking and messing about with LaTeX.

In case you should whish to contanct me you can do so at carlos@cmartin.tk. To subscribe RSS 2.0 feed

 

The not-so-enhanced for loop

In Java, there’s a loop construct called “enhanced for loop” (it’s just a foreach, don’t get too excited). I decided to use it in the obvious, straightforward way thus: for(String str : words){ str = doSomething(str); } return words; Many will see the problem already. In Java, a variable doesn’t hold your data, everything (except [...]

Tags: , , ,

Filed under:Programming