public class SampleClass{ //valid method name static void var(String s){ //valid variable name var var = s; System.out.println(var); } public static void main(String[] args){ SampleClass.var("Hello!"); } } //compile-time error /* class var{ } */