Coffeehouse Post

Single Post Permalink

View Thread: Java value types Vs .NET
  • User profile image

    , Bass wrote


    What is wrong with something like this? Integer is a ref type.

    privatevoidfoo(Integer i) {
      i = 6;

    I use int.

    Just so you know, it is not only for consistancy. While most people use int, not Integer, there is more to it. If you are going to do uint[ int.Max ], you would waste memory on pointers. And this is crucial for stuff like BioInformatics.

    Of course, it is kinda pointless to use Java on BioInformatics. Everyone has tried on Java gave up and switch to C++ due to massive performance issues.