Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to avoid if else blocks

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


here is one of my validator classes. I am wondering if there is any better way to handle such simple validation rules and avoid all these if else blocks can I follow any design pattern or can I use any scripting language which can make this simple to read
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic