Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-22-2009, 03:50 PM
Member
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
shacht1 is on a distinguished road
Default Wrong output (well.. the one who's wrong is probably me ;) )
Why do i get the output when the boolean value is false??
Attached Images:
File Type: jpg Capture.JPG (59.0 KB, 5 views)
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-22-2009, 04:06 PM
Fubarable's Avatar
Moderator
 
Join Date: Jun 2008
Posts: 6,431
Rep Power: 8
Fubarable is on a distinguished road
Default
Please post your code here if you can using code tags, not an image.

If you do this:
Code:
if (myBoolean = true) { // = means assignment
you are SETTING myBoolean to true. Better would be:
Code:
if (myBoolean == true) { // == means testing for equailty
and BEST would be:
Code:
if (myBoolean) {  // don't even need == true here
__________________
When posting code, please use code tags so that your code is readable. To do this, place the tag [code] before your block of code and [/code] after your block of code.
How to use Code Tags
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-22-2009, 04:48 PM
Member
 
Join Date: Nov 2009
Posts: 2
Rep Power: 0
shacht1 is on a distinguished road
Default Thanks!!
i'll use the code function from now on
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what am i doing wrong here?? tornbacchus New To Java 19 04-16-2009 04:54 AM
what's wrong? rayda New To Java 3 04-14-2009 10:07 PM
What did i do wrong jpnym15 New To Java 8 11-17-2008 11:07 AM
what's wrong in here!!! Annatar New To Java 8 11-14-2008 03:55 AM
So, what am I doing wrong? Charles_Smith New To Java 0 10-29-2008 03:50 PM


All times are GMT +2. The time now is 11:39 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org