in
java non-static fields can not be accessed in a static field.
But if we create an object of class type in static field and then call non-static field in it, it works fine as in following program ( Ultimately this is what we do in static main method). So is right to say that practically its not impossible to call non-static fields in static fields.
//Static.java
public class Static
{
static void stat()
{
Static st1 = new Static();
st1.stat1();
}
void stat1()
{
System.out.println("You can call me within static method with the help of class object");
}
public static void main(
String args[])
{
Static st1 = new Static();
st1.stat();
}
}