File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Differnce between array declaration
Joined: Oct 30, 2007
Aug 21, 2008 11:42:00
What is the basic difference between the below(1),(2)declarations?
Joined: Oct 02, 2003
Aug 21, 2008 11:58:00
the first one is perferred by most people, but otherwise, there isn't a difference.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Oct 13, 2005
Aug 21, 2008 12:12:00
According to somewhere on the Sun site
is preferred because it makes it clear that the type of the variable is an array.
It is sorta covered in the
JavaRanch Style Guide
subject: Differnce between array declaration
Kathy / Bert static final variables
Local Inner Class
Subtle Array question
Supressing nulls in jsp
5 Golden Rules of widening, boxing & varargs
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013