I am kind of embarrassed about this, and definitely I am just forgetting something simple.
if this is body.java
public class body{
public static void main(String args[])
{
int i = 0;
part aPart = new part(i);
aPart.add();
}
}
and this is part.java
public class part{
private int i;
public int part(int i)
{
this.i = i+10;
}
public add ()
{
i = i++;
System.out.println(i);
}
Why when i run javac to compile body.java, it says unknown symbol for part?