Skip to content

Exceptions#6

Open
Dolev3 wants to merge 2 commits intomasterfrom
exeptions
Open

Exceptions#6
Dolev3 wants to merge 2 commits intomasterfrom
exeptions

Conversation

@Dolev3
Copy link
Owner

@Dolev3 Dolev3 commented Aug 10, 2025

No description provided.

ex_8();
}

public static void exeptions(Exception runTimeException, Exception indexOutOfBoundsException) throws Exception {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of making the exceptions' type Exception make it more specific


public static void exeptions(Exception runTimeException, Exception indexOutOfBoundsException) throws Exception {

indexOutOfBoundsException.getStackTrace();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just gets the stack trace it doesn't print it

}

public static void ex_3() {
for (int i = 0; i > -1; i++) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use for and not use the index instead of using while?

}
}

public static void ex_6(int num) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you forgot to print "here", and try to solve it without saving a boolean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants