title: What is the most costly operation on the JVM?
body: <p>I remember that my professor said that <code>new</code> operation is the most costly operation on JVM. Is this true? I mean, more expensive than opening a file? And how can I know the cost of any operation in Java? For example, finding the difference between</p>
  
  <pre><code>int a;
  Integer b;
  Integer c = new Integer(1);
  int[] d = new int[10];
  Integer[] e = new Integer[10];
  </code></pre>