How do you access/invoke a method from another class? Please could you provide an example.
David Maddox
Greenhorn
Joined: Feb 25, 2004
Posts: 12
posted
0
ok here is an example public class Dog{ public void bark(){ } }
public class dogTest{ Dog dog= new Dog(); /*you create a dog object and it has all of its methods/* dog.bark(); } [ February 26, 2004: Message edited by: David Maddox ] [ February 26, 2004: Message edited by: David Maddox ]
Naf Rash
Ranch Hand
Joined: Feb 19, 2004
Posts: 85
posted
0
I think that you may have forgotten to post the example! Thanks.
Naf Rash
Ranch Hand
Joined: Feb 19, 2004
Posts: 85
posted
0
Ignore what I just said for some reason the code did not load earlier on. Sorry.