#35 Known is a drop! break; return; continue; yield; throw;
java
dev.to
1. break Used to immediately stop a loop or switch. for(int i=1; i5; i++) { if(i == 3) { break; } System.out.println(i); } Output: 1 2 When i == 3, loop stops completely. 2. continue Skips current iteration and moves to next iteration. for(int i=1; i5; i++) { if(i == 3) { continue; } System.out.println(i); } Output: 1 2 4 5 3 is skipped, but loop continues. 3. return Ends the method execution. public int add(int a, int b) { r