Class1
public class class1
{
int number_to_send = 71;
class2.set_number_holder(number_to_send);
}
Class2
public class class2
{
int number_holder;
public void set_number_holder(int num)
{
this.number_holder = num;
}
}
But I cant do this because when I type "class2." my editor doesn't show me my method that I made in class2. I know if I created the Class2 variable in class1 it would work but I cant do that. I need to get that int to the other class without creating a class2 variable in class1.
This post has been edited by giuseppe105: 13 May 2010 - 01:35 PM

New Topic/Question
Reply




MultiQuote







|