package examples.aop.throwsinterceptor;

public class RandomNumber {
	public void calc(int num) {
		int _num = (int) (Math.random() * 10 + 1);

		System.out.println(_num);
		if (_num == num) {
			System.out.println("success!");
		} else {
			throw new RuntimeException();
		}
	}
}