get the object property in another class
<p>i have a Emp class which have one property empName.i am setting this property in empCreate class.i want to get this property in Main class.</p>

<pre><code>public class Main {
    public static void main(String[] args) {
         // here i want to get empName which i set it in empCreate.java
    }
}
</code></pre>

<p>how i can do this. please suggest.</p>

<hr>

<p>i have Emp.java: </p>

<pre><code>public class Emp { 
private String empName; 

    public String getEmpName() { 
        return empName; 
    } 

    public void setEmpName(String empName) { 
        this.empName = empName; 
    } 
} 
</code></pre>

<p>and empCreate.java: </p>

<pre><code>public class empCreate { 
    public static void main(String args[]) { 
        Emp emp= new Emp(); 
        emp.setEmpName("abc"); 
    } 
} 
</code></pre>

<p>i want to get this property in Main.java which i set it in empCreate.java </p>
