Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Switch is more efficient than nested if or if - else in java
Home
>>
Category
>>
Java (MCQ) questions and answers
>>
Core Java
Q. Switch is more efficient than nested if or if - else in java.
- Published on 22 Jul 15
a.
True
b.
False
ANSWER: True
Related Content
Core Java (
160
)
JDBC (
45
)
Hibernate (
12
)
Struts (
26
)
EJB (
25
)
RMI (
23
)
JSP (
22
)
Servlets (
27
)
Applets (
24
)
AWT and Swing (
25
)
Wrapper classes (
15
)
Basic concept of Networking (
19
)
XML (
32
)
Discussion
Prajakta Pandit
-Posted on 14 Dec 15
- The above statement is true.
- A switch statement is faster than or equivalent to if-else, because the compiler generates a jump table for a switch during the compilation.
- Switch is more readable, in comparison to if-else statement.
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲