![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
重载
郑兽兽
睡在哪里都是睡在夜里
展开
-
在同一个类中,分别定义求两个整数的方法 和 三个小数之和的方法。 并执行代码,求出结果
代码: public class Zheng { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); System.out.println("两个整数的和是"+...原创 2020-03-09 21:03:34 · 812 阅读 · 0 评论 -
在同一个类中定义多个方法:要求不仅可以求两个整数的最大值,还可以求两个小数的最大值,以及两个小数和一个整数的大小关系
代码: public class Zheng { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); System.out.println("两个整数中最大的是...原创 2020-03-09 21:01:06 · 1122 阅读 · 0 评论