代码拉取完成,页面将自动刷新
package text.java;
import java.util.Scanner;
public class heroTest {
public static void main(String[] args){
hero hero1 = new hero(99,6,23,16,8);
hero hero2 = new hero(21,97,16,17,4);
Scanner scan = new Scanner(System.in);
System.out.println("please enter the number of average cd:");
hero2.average_cd=scan.nextInt();
hero1.skill();
hero1.cd();
hero2.cd();
System.out.println(hero2.toString());
if(hero1.compareTo(hero2)==0 )
{
System.out.println("hero1 has better attack damage");
}
else System.out.println("hero2 has better attack damage");
System.out.print("object function test result:");
System.out.println(hero1.hashCode()==885284298);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。