syntax - Java version of OCaml underscore -


if i'm testing like

corrector c = new filecorrector("filenotfound.txt"); 

and know code fail, , c never used, there way can write code ocaml _ symbol?

corrector _ = new filecorrector("filenotfound.txt"); 

why not not give variable name?

new filecorrector("filenotfound.txt"); 

it looks odd because constructors shouldn't have side-effects. can throw, , literally can have side effects, it's not code doesn't anything. , far eclipse warnings concerned, preferred unused variable.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

java - gson parse items from comma-separated-value string within a json value -

Validation in java Error log in register -