day04-方法定义的练习

This commit is contained in:
2026-01-16 15:08:48 +08:00
parent c98641a98f
commit 26e2479db0
2 changed files with 53 additions and 2 deletions

View File

@@ -35,8 +35,9 @@ package com.inmind.method01;
*/
public class Demo01 {
public static void main(String[] args) {
int i;
i = getSum(10,20);//方法调用处
int a = 10;
int b = 20;
int i = getSum(a,b);//方法调用处
System.out.println(i);//30
}