Question: I humbly request an explination and why did it keep continuing giving the shoudn't the output only be 1:Lower and the rest is ignored due

I humbly request an explination and why did it keep continuing giving the shoudn't the output only be 1:Lower and the rest is ignored due to the try ?
I humbly request an explination and why did it keep continuing giving

1 public class nunclass public statio void main(String[] args) { Int() * = {1, 2, 0, 10); for (int y : x) { try { 1+ (y > (x.length / 2)) throw now Exception("Higher"); etso throw new Exception("Lower"); } catch (Exception ex) { System.out.println(y + ":" + ex.getMessage()); //end of loop /end of main 0}} 10 11 12 13 14 15 I Run: numclass /Library/Java/JavaVirtual Machines/jdk-15.Jdk/Contents/Home/bin/java -jaw 1:Lower 7: Higher @: Lower 10:Higher IA EDE Process finished with exit code @

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!