I was reading and faced with interesting look of main method which I didn't see before. Is there any difference between
public static void main(String[] args)
and
public static void main(String a[])
As I see applying either of them gives me the same output
public static void main(String a[]){
List <Integer> li = new ArrayList <Integer>();
ListIterator <Integer> liItr = null;
li.add(1);
li.add(2);
li.add(3);
li.add(4);
li.add(5);
li.add(6);
li.add(7);
liItr = li.listIterator();
System.out.println("Elemnets in forward direction");
while(liItr.hasNext()){
System.out.println(liItr.next());
}
System.out.println("Elements in backward direction");
while(liItr.hasPrevious()){
System.out.println(liItr.previous());
}
}
}
P.S. I consider myself as a beginner of Java. If someone could highlight giving me some explanation on that it would be nice