File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean Question in SimpleTableDemo.java Sun sample prog

 
Geoff Jefferson
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How does the boolean value DEBUG ever get changed?



 
Rob Spoor
Sheriff
Pie
Posts: 20368
43
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By reassigning it? This flag is probably meant as a means to switch debugging on and off quickly. It should probably be static and final, making it a constant. The developer then sets it to true when he needs to debug, and back to false when he deploys it.
 
Geoff Jefferson
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's kinda' silly to put in an educational example I think.
Muddies the water.

Thanks.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic