Unlikely Teacher

1. Share Everything* [Programming Gotchas, Technology News, Insights on Living and Everything in Between]

Entries Tagged as 'C#'

Java vs C# – switch statements

March 19th, 2008 · 1 Comment · C#, Java

This is my first installment of a new blog series I’m planning to call Java vs C#.
Today, I’ll be discussing the behavior of “switch” statements in both Java and C#.
Consider this snippet for Java which prints out the values “1″, “2″ and “Default” when value = 1.
Since I did not add “break” statements after each [...]

[Read more →]

Tags: ···