KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > RetTest


1 public class RetTest {
2
3     public static void main(String JavaDoc [] args){
4         RetTest r = new RetTest();
5         int c = r.run(9);
6     }
7
8     public int run(int i){
9         if (i == 8) {
10             return 7;
11         }
12         else {
13             return 8;
14         }
15     }
16
17     public void go(int i){
18         if (i == 9){
19             System.out.println("smile");
20             return;
21         }
22         else {
23             return;
24         }
25     }
26 }
27
Free Books   Free Magazines  
Popular Tags