package oop.huanshu;
import java.io.IOError;
import java.io.IOException;
//d1 类
public class d1 {
//main 方法
public static void main(String[] args) {
}
/*
修饰符 返回值类型 方法名(...){
//方法体
return 返回值;
}
*/
public String sayHello(){
return "hello,world";
}
public void hello(){
return;
}
public int max(int a,int b){
return a>b? a : b;//三元算法!
}
//数组下标越界 Arrayindexoutofbounds
public void readFile(String file) throws IOException{
}
}
进程已结束,退出代码为 0
回顾方法的定义
最新推荐文章于 2024-06-29 11:59:11 发布