为什么多为数组里的b是数组地址呢,而a是数组呢
为啥我这个运行不出来结果
package com.itbaizhan; //数组的说明和创建 public class Test01 { public static void main(String[] args) { int[] s;//声明数组 s = new int[10];//给数组分配空间 for(int i = 0;i<10;i++){ s[i] =i+1;//给元素赋值,数组是对象,数组中的元素就是对象的属性 System.out.println(s[i]); man[] mans = new man[10]; man m1 = new man(1,11); man m2 = new man(2,12); mans[0] = m1; mans[1] = m2; System.out.println(mans[0].getId()); System.out.println(mans[1].getAge()); } } class man{ private int age; private int id; public man( int id,int age) { this.id = id; this.age = age; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public int getId() { return id; } public void setId(int id) { this.id = id; } } }
这是怎么回事呢
这是这么一回事呢
下载好之后重新点击这个就会出现下载的页面,没有所谓的卸载
按此电脑的时候,属性中没有高级属性,找不到环境变量。
package com.company; public class classTest { public static void main(String[] args) { student student = new student("高琪", 180, "教师"); student.study(); } } class person{ String name; int hight; public void rest(){ System.out.println("我要休息一会re"); } } class student{ String major; person person = new person(); public void study(){ System.out.println("我要学习!"); person.rest(); System.out.println(this.person.name); System.out.println(this.person.hight); System.out.println(this.major); } public student(String name,int hight,String major) { this.person.name = name; this.person.hight= hight; this.person.rest(); this.major = "教师"; } }
public class Welcome{ public static void main(String[],args){ System.out.println("Hello World"); } }
这个length是在哪声明的?
package com.company; /* * 定义一个方法处理公司的迟到问题; * (1)输入:迟到时间,月薪。 * (2)处理逻辑: 1迟到1~10分钟,警告. 2迟到11-20分钟,罚款100元. * 3迟到21分钟-30分钟,罚款200元. * 4迟到30分钟以上,扣除半日工资。 5迟到1小时以上,按照旷工计算,扣除3日工资. * 输出:罚款金额 */ public class mathod_fine { public static void main(String[] args) { handlete(30, 8000); } public static int handlete(int latetime,int mouthday){ int money = 0; int daymoney = (int)(mouthday/22.5); int qq = mouthday-money; System.out.println("请输入你迟到时间"); System.out.println(latetime); System.out.println("请输入你的月薪"); System.out.println(mouthday); if(latetime<=10){ System.out.println("给你警告!"); }else if(latetime<=20){ System.out.println("罚款100元"); money = 100; System.out.println("剩下工资"); qq = mouthday-100; System.out.println(qq); }else if(latetime<=30){ System.out.println("罚款200元"); money=200; System.out.println("剩下工资"); qq = mouthday-200; System.out.println(qq); }else if(latetime<=60){ System.out.println("罚款半天工资"); money=(int)daymoney/2; System.out.println("剩下工资"); qq = mouthday-daymoney/2; System.out.println(qq); }else System.out.println("按照旷工计算,扣除3日工资."); money=daymoney*3; System.out.println("剩下工资"); qq = mouthday-daymoney*3; System.out.println(qq); return money; } }
为什么在剩下工资下还有一个剩下工资
TestThis { (){ System..println()} (ab){ ()a = a.=a.=b} (abc){ (ab).= c} (){ } (){ .sing()System..println()} (String[] args) { TestThis hi = TestThis()hi.eat()} }
为什么这里结果会输出一个“正在初始化一个Hello对象”呢?,main方法里面也没有输出它呀
这个方法不用调就能用吗?
为什么不用循环而是用if?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637