i am newbie to java.i am trying to run a program to show "static method" and "static variable ".my code is below.i am compling it on netbeans 7.01 and everytime i am getting the error.:
"main method not found in class static_demo.Static_demo, please define the main method as:
public static void main(String[] args)"
please help me in executing the code.
package static_demo;
public class Static_demo {
int a=10;
static int b=20;
static void show()
{
System.out.println("the value of b:"+b);
}
void anothershow()
{
System.out.println("value of a"+a);
}
}
class static_demo1
{
public static void main(String[] args)
{
x1.show();
x1 v=new x1();
v.anothershow();
}
}