返回列表 發帖
本帖最後由 楊于暄 於 2019-1-25 10:24 編輯
  1. public class Ch29
  2. {
  3.         static void hello(int n)
  4.         {
  5.                 for(int i=0; i<n; i++)
  6.                         System.out.println("Hello!");
  7.         }
  8.         static int myplus(int a, int b, int c)
  9.         {
  10.                 return a+b+c;
  11.         }
  12.         public static void main(String[] args)
  13.         {
  14.                 hello(5);
  15.                 System.out.println(myplus(1,2,3));
  16.         }
  17. }
複製代碼

TOP

返回列表