How about?
public static int tableNumber;
This would be accessible. Setting it in the main activity
may help you in what you need. But since this is Android, there is a much easier and cleaner way of passing the data to another activity, like this,
Intent activity = new Intent(this, SecondActivity.class);
activity.putExtra("tableNumber", 1234);
startActivity(activity);
Later, on the second activity you can get the value from the intent that started this activity.
Intent previousActivity = getIntent();
int tableNumber = previousActivity.getIntExtra("tableNumber", 0);
In my opinion, this is much efficient way of sharing the values and data from one activity to another. Although static variables may work, but they are not recommended ways of passing the data from one activity to another.
I was going to write an article about this, but since it is not yet available, you may want to read this instead.
android - How to use putExtra() and getExtra() for string data - Stack Overflow[
^]