Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public class e14 {
  2. public static void main(String [] args) {
  3. System.out.println(MyMath.getRandom(3,9));
  4. }
  5. }
  6. class MyMath {
  7. public static int getRandom(int min, int max) {
  8. return (int) (Math.random()*((max-min)+1))+min;
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement