这个for循环中的参数 i:a是什么意思呢?
public class Testextance { public static void main(String[] args) { Student s=new Student(12,"huangkai",12); } class Person{ String name; int age; public void rest(){ System.out.println("休息!"); } } class Student extends Person{ int id; public void study(){ System.out.println("学习!"); System.out.println(name); rest(); } public Student(int age,String name,int id){ this.age=age; this.name=name; this.id=id; } } }
老师 请问静态属性或方法是不用声明对象 就可以直接调用的是吗?
import java.util.Scanner; public class TestSalary { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("***********我的薪水计算器***********"); System.out.println("1.输入 88,退出程序\n2.输入 66,计算下一个年薪"); while(true){ System.out.println("请输入月薪:"); int monthSalary = s.nextInt(); System.out.println("请输入一年几个月薪资:"); int months = s.nextInt(); int yearSalary = monthSalary*months; //年薪 System.out.println("年薪是:"+yearSalary); if(yearSalary>=200000){ System.out.println("恭喜你超越 98%的国人"); }else if(yearSalary>=100000){ System.out.println("恭喜你超越 90%的国人"); } System.out.println("输入 88,退出系统;输入 66,继续计算。"); int comm = s.nextInt(); if(comm==88){ System.out.println("系统退出!"); break; } if(comm==66) { System.out.println("继续计算下一个薪资"); continue; } } } }
老师,因为这个循环本身是死循环,跳出这个循环和不跳出这个循环,之后执行结果都一样,是不是continue就可加可不加
就是说那个树形图我没找到,可以发我看看吗
Test02 { (String[] args) { String[] s = {}String[] s1 = String[]System.(ss1s.)(i = i < s1.i++) { System..println(s1[i])} } }
为什么,我从s数组第一个索引拷贝到s1数组的第0个索引,会出现这个?请老师看看,谢谢
一直没太理解方法为什么可以这么写 这个test1(A a)中的A a指的是什么参数呢?
M]24M68F~8L)7G0LNI8I1T7.png
这个标签为什么不能用了
微信图片java.png
为什么我的命令和代码不一样
在类中构建接口的对象,格式必须时 接口 变量名 = new 类名 这样吗
老师请问一下这个是为啥?
老师您好,我现在new的是dog对象,并不是抽象类animal,为什么也会报错呢
老师,我的是这样,是怎么回事
像这种把b再次强制转型为什么会报错呢
位运算:在&、|、^、~这四个运算符参与的运算中,其操作数符号位也同数值位一样参与运算对吧?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637