aspose file tools*
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
Author

variable declarations

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

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.


SCJP
Visit my download page
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

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

edit http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#96595

luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: variable declarations