Hello,
I tried following code...
I u run it as
java testMain the o/p is
in main 0
Exception in
thread "main" java.lang.NullPointerException
at testMain.m1(testMain.java:12)
at testMain.main(testMain.java:8)
Even if args to main are not initialised while running the program, args.length prints '0'. But if static arr a1 is not initialised and a.length is tried , it throws NullPointerException. Why so??? or i am missing something??
or args to main are automatically initialised???
Thanx in advance.
Rashmi