Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class rnd {
- public static double rnd1() {
- double d;
- while (true) {
- d = Math.random();
- if (d < 0.01)
- return d;
- };
- }
- public static double rnd2() {
- double d;
- while (true) {
- d = Math.random();
- if (d < 0.01)
- break;
- };
- return d;
- }
- }
- /*
- $ javac Solution.java
- test.java:8: error: unreachable statement
- };
- ^
- 1 error
- /*
Add Comment
Please, Sign In to add comment