From 5d1c72515cbffc2e744c2ca2d500f75a3e74f1c3 Mon Sep 17 00:00:00 2001 From: caminsha Date: Thu, 27 Feb 2020 23:37:43 +0100 Subject: Added short explanation about break statement --- processing.html.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'processing.html.markdown') diff --git a/processing.html.markdown b/processing.html.markdown index cf2dd77d..d0952e96 100644 --- a/processing.html.markdown +++ b/processing.html.markdown @@ -191,6 +191,8 @@ int i = 3; String value = (i > 5) ? "Big" : "Small"; // "Small" // Switch-case structure can be used to check multiple conditions concisely. +// It is important to use the break statement. If the `break`-statement does +// not exist the program executes all the following cases after a case was true. int value = 2; switch(value) { case 0: -- cgit v1.2.3