Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes variable declarations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "variable declarations" Watch "variable declarations" New topic

variable declarations

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

i just want to confirm what i read today. assigning an int a value of 0, or an object a value of null when you declare it is redundant.

Visit my download page
Darryl Burke

Joined: May 03, 2008
Posts: 5115

That applies to class and instance fields. Not to local variables.


luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: variable declarations
jQuery in Action, 3rd edition