Digital Stronghold - Software Engineering, Musicality and Facts of Life…



May 8, 2008

Default Values of Primitives in Java

Default values apply only to instance variables that are uninitialized. Local variables need to be initialized explicitly before use or else the compiler will yell at you.

boolean - false
byte - 0
short - 0
char - ‘\u0000′
int - 0
long - 0L
float - 0.0F
double - 0.0D

Comments »

The URI to TrackBack this entry is: http://eradicus.blogsome.com/2008/05/08/default-values-of-primitives-in-java/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Theme designed by Joset Anthony Zamora


Digital Stronghold

↑ Get Headline Animator