Archive for the ‘Java’ Category

Java - accessing methods from other classes

I am going to show you how to link to methods in other classes in Java
public class ClassName {
private int index;
private String name;
public ClassName() {
index = 0;
name = “Simon”;
}
public void methodName {
// method here
}
}
Now we are going to access a method called otherClassMethodName from the class OtherClass, look at the code in red, this [...]

Read the Rest...

Posted in Java

No Comments »