two examples:-
class Base {
public int iNoEnc=77;
}
public class NoEnc{
public static void main(
String argv[]){
Base b = new Base();
b.iNoEnc=2;
System.out.println(b.iNoEnc);
}}
//here nonstatic iNoEnc is accesed from within static method
_________________
public class St{
int i;
public static void main(String argv[]){
i = i + 2;//Will cause compile time error
}}
so can I say, that with a '.' reference one can access non static var. from static methods ?
Thx.