返回列表 發帖
  1. public class Ch02 {

  2.         static void sayHello(int n)
  3.         {
  4.                 for(int i=1;i<=n;i++)
  5.                         System.out.println("Hello!");
  6.         }
  7.        
  8.         static int myPlus(int a,int b,int c)
  9.         {
  10.                 return a+b+c;
  11.         }
  12.        
  13.         public static void main(String[] args) {
  14.             sayHello(5);
  15.                 System.out.println(myPlus(1,2,3));
  16.         }
  17. }
複製代碼

TOP

返回列表