sum of two numbers in java using two classes : <p>I want to make sum of two numbers. But I have problems to do that. I don't understand why my sum is always zero.</p>

<p>class A</p>

<pre><code> public class A {
 int a=3 ,b=4;
 public static void main(String[] args) {
 B obj= new B();
 obj.prod();
}
}
</code></pre>

<p>CLASS B</p>

<pre><code> public class B {

int a, b;
public void prod()
{
    System.out.print(a+b);
}

}
</code></pre>
