This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how to  avoid if else blocks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to  avoid if else blocks " Watch "how to  avoid if else blocks " New topic

how to avoid if else blocks

srini carry
Ranch Hand

Joined: Nov 30, 2007
Posts: 83

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
I agree. Here's the link:
subject: how to avoid if else blocks
It's not a secret anymore!