title: how to get all variable and type data in class and method using java
body: <p>I have a class and i want to find all variable and type data.</p>
  
  <p>for e.g</p>
  
  <pre><code>class ex
  {
      String A,B;
      public void method()
      {
          int a;
          double C;
          String D;
      }
  }
  </code></pre>
  
  <p>so i want output like this</p>
  
  <pre><code>A : String
  B : String
  a : int
  C : double
  D : String
  </code></pre>