Posted By:
seetha_lakshmi
Posted On:
Tuesday, September 20, 2005 05:58 AM
hi,
if i have understood your query properly here is the answer..
we can put non-static methods in a static class.
but we can access it only through an instance of the static class since it is non-static .
public class StaticClassTest {
public static class A { // static class
public void print(){ // non-static method
System.out.println("Hello");
}
}
public static void main(String[] args) {
A obj = new StaticClassTest.A();
obj.print();
}
}
does this answer ur question?