title: Inner class declaration and initialization
body: <p>I am used to code in C++, but have to convert a project from C++ to Java. In C++ using data structure is pretty much simple. I am trying to replicate the same thing, but such as a <a href="https://stackoverflow.com/questions/70324/java-inner-class-and-static-nested-class">Java inner class and static nested class</a>. After reading several examples online, and trying different versions, so far this is what I got:</p>
  
  <pre><code>public class Main {
    public static void main( String[] args ) {
    ...
      ClassOuter outerObj = new ClassOuter();
  
      ClassOuter.DataInner value = outerObj.new ClassOuter.DataInner();
    }
  }
  
  class ClassOuter{
  
    public static class DataInner{
      public int x;
    }
    ...
    protected void getNo()
    { value.x=Integer.parseInt("493"); 
    }
  }
  </code></pre>
  
  <p>However, when I try to compile, it gives me the error:</p>
  
  <pre><code>$ javac -cp "./" Main.java
  Main.java:15: error: '(' expected
      ClassOuter.DataInner value = outerObj.new ClassOuter.DataInner();
  </code></pre>
  
  <p>Any clue about what is missing here?</p>