how to access a method from another class in a another package java code example
Example 1: how to access methods from another class in java
public class Alpha {
public void DoSomethingAlpha() {
Beta cbeta = new Beta();
cbeta.DoSomethingBeta(); //?
}
}
Example 2: import classes from another project java
Right Click > Project.
Click Project Properties.
Click Java Build Path.
Click the Projects Tab.
Click the Add Button.
Select the Project.
Click OK.