摘要: Java方法调用的回顾 package oop;​public class Demo02 {​ public static void main(String[] args) { //静态方法 用static修饰 Student.say();//直接调用 //非静态方法 //类名 对象名 对象值 St 阅读全文
posted @ 2021-03-11 20:05 默默努力的路人甲 阅读(42) 评论(0) 推荐(0)
摘要: Java定义方法 package oop;​public class Demo01 { public static void main(String[] args) {​​ } /* 修饰符 返回值类型 方法名 (方法参数){ 方法体 return 返回值与返回值类型相同 } */ public S 阅读全文
posted @ 2021-03-11 19:22 默默努力的路人甲 阅读(40) 评论(0) 推荐(0)