Did anybody please explain me wat is the problem here...
it is showing a null pointer exception...
it is showing a null pointer exception...
Code:
class array { String var; public static void main(String args[]) { array obj[]; obj = new array[1]; obj[0].var="1"; System.out.println(obj[0].var); } }
Comment