A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
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.
I agree. Here's the link:
subject: Differnce between array declaration
Supressing nulls in jsp
Kathy / Bert static final variables
Subtle Array question
Local Inner Class
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-2015