File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

alternative available for If Else condiotion

 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using if ..else condition in my code for condition based coding...Is there any alternative available for If Else condition in java..!! please advise..!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why? What's your beef with "if"?

If this is an interview question, please let us know. Such questions rarely make real-world sense and it'll save a lot of time trying to figure out why you are asking the question in the first place.
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Why? What's your beef with "if"?

If this is an interview question, please let us know. Such questions rarely make real-world sense and it'll save a lot of time trying to figure out why you are asking the question in the first place.


It is just for my knowledge ...is there any alternative available to if else block!!
 
Paul Clapham
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knowledge is not acquired by making up random questions.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saral Saxena wrote:
Bear Bibeault wrote:Why? What's your beef with "if"?

If this is an interview question, please let us know. Such questions rarely make real-world sense and it'll save a lot of time trying to figure out why you are asking the question in the first place.


It is just for my knowledge ...is there any alternative available to if else block!!


There are several possible alternatives. Which ones are applicable depends on exactly what you're doing in your if.

And of course, one has to ask why you want an alternative to if. In what way do you find it not suitable for the specific thing you're doing?
 
dennis deems
Ranch Hand
Posts: 808
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Switch statement
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic