The Startup
Published in

The Startup

Understanding switch-case fall-through in Java

Photo by Erwan Hesry on Unsplash

Scala and Kotlin both build on Java, and they both carry over many features that are familiar to C and C++ programmers, like if statements, while and do-while loops.

But not switch-case statements. The inventors of both Scala and Kotlin wanted the functionality of switch-case, but without the fall-through semantics that confuse so many programmers.

--

--

--

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +756K followers.

Recommended from Medium

#Terraform #RedTeam C2

June 2019 Content Summary

Ansible playbook and different os variable files

Flutter Architecture : Implement MVP Pattern

Read Receipts in Newton

MySQL Adventures: MetaBase Sync May Eat Your InnoDB Buffer Pool

When you type ls -l *.

Object Oriented Programming: The Fundamentals

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alonso Del Arte

Alonso Del Arte

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

More from Medium

When Disaster Strikes: Production Troubleshooting

Java Reflection: Check if a POJO Contains Null Values

Varargs in Java

[Solved] Can’t load Java FXML file from different package