Question :What is the difference between an if statement and a switch
statement? (CoreJava)
Answer :The if statement is used to select among two alternatives. It uses a
boolean expression to decide which alternative should be executed. The
switch statement is used to select among multiple alternatives. It uses an
int expression to determine which alternative should be executed.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Thursday, March 12, 2009
What is the difference between an if statement and a switch
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment