Is there a way i can pass a variable from one class with main to another one with main method. For example
class A
{
public static void main(String [] args)
{
int num = 5;
}
}
class B
{
public static void main(String []args)
{
}
}
Is there a way Class B can access int num from class A without getting null value?