HELP! This is a two-part single question so please answer both
parts accordingly and provide work shown.
For each of the following, describe why Java will or won't
complain. If it will, describe how to fix it.
1. A) var x = 1 / 2L - '3' * 4.0f + "5";
B) long y = console.nextByte();
C) if((2^7)>=5){Math.abs(-4);}
D) for(;;){;}
E) boolean false = false;
Concerning Exceptions, give detail:
2. A) What is an Exception?
B) Provide an example in pseudocode of
when you should throw an Exception.
C) In what ways are return and throw
similar? in what ways are they different
HELP! This is a two-part single question so please answer both parts accordingly and provide work shown. For each of the
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
HELP! This is a two-part single question so please answer both parts accordingly and provide work shown. For each of the
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!