KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > examples > bound > src > Main


1 package spoon.examples.bound.src;
2
3 import spoon.examples.bound.annotation.Bound;
4
5 public class Main {
6
7     public static void main(String JavaDoc[] args) {
8         for (int i = 0; i < 10; i++) {
9             try {
10                 new Main().m(i);
11             } catch (RuntimeException JavaDoc e) {
12                 System.out.println(e.getMessage());
13             }
14         }
15     }
16
17     public void m(@Bound(min = 2d, max = 8d)
18     int a) {
19         System.out.println(a);
20     }
21
22 }
23
Popular Tags