📜  void 方法 java 代码示例

📅  最后修改于: 2022-03-11 14:52:38.763000             🧑  作者: Mango

代码示例2
int a = 20;
int b = 20;
public static void sum(){ // Void Method
  System.out.println(a + b);
}
public static int sum(){ // Return Function
  return a + b;
}