Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

boolean versus Boolean PLUS STATIC KEYWORD

807606Mar 4 2007 — edited Mar 4 2007
If I want to initialize a variable I use boolean keyword. If I do not initialize a boolean variable with a value, which value will it hold TRUE or FALSE?
Is it possible to print let say in System.out.print(aBooleanVariable) the value of a boolean variable.
I always get error. Then I tried to put
// boolean static aBooleanVariable;
keyword static in initialization and compiler replies:
<identifier> expected

What is identifier?
What is the difference between boolean and Boolean?
Is the first prototype and the second class and when do we use "Boolean"?

I read in a book that static makes all its members the same. I don't understand that? Can someone please explain?
A friend told me that static is used for sparing with memory ... Is this true? Please someone help me.
Thanks so much in advance.
Sincerely, Grega Leskov�ek
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2007
Added on Mar 4 2007
2 comments
126 views