I was creating String array with few elements. At that time I notice that I have put comma after first element and it’s still compile. I thought it won’t compile. Then I print the size and it says 1
String args [] = {request.getParentMessageID() , };
System.out.println(args.length);
So
String args [] = {request.getParentMessageID() , }; and String args [] = {request.getParentMessageID()};
both behave as same.
Could someone kindly explain why these are not different and Why it compile.