Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean Question in SimpleTableDemo.java Sun sample prog

 
Geoff Jefferson
Ranch Hand
Posts: 102
  • 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: 20532
54
Chrome Eclipse IDE Java Windows
  • 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
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic