返回列表 發帖
  1. public class Ch09 {
  2.         public static void main(String args[]) {

  3.                 hello(6);
  4.                 System.out.println(myPlus(1, 2, 3));

  5.         }

  6.         static int myPlus(int a, int b, int c) {
  7.                 return a + b + c;
  8.         }

  9.         static void hello(int n) {
  10.                 for (int i = 0; i < n; i += 1) {
  11.                         System.out.println("hello!!");
  12.                 }
  13.         }
  14. }
複製代碼

TOP

返回列表