Home  >  Forum  >  Core Java
Post New Query

Flavors of variable in Java Programming Language



Asked on March 10, 2015
Can any one tell me the flavors of variable that is used in Java ?


Replied on March 10, 2015
Variables come in two flavors: primitives and reference.

Variables must always be declared with a name and type.

A primitive variable value is the bits representing the value(9, 'a', 11.3331, etc.).

A reference variable value is the bits representing a way to get to an object on the heap.


Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us