【#文档大全网# 导语】以下是®文档大全网的小编为您整理的《我的世界电脑板源代码.java》,欢迎阅读!
import class z {
public static void main(String[] args) {
Worker worker=new Worker(); Ys ys=new Ys(); try {
(); } catch (jkzkException e) {
(worker); if().equals("健康")){
"恭喜你健康了"); }else {
"00000000尽力了"); } }finally{
"欢迎下次再来"); } } }
class Worker{
private String status;
public void satStatus(String status){
=status; }
public String getStatus(){
return status; }
public void work()throws jkzkException{
Random random=new Random(); int rad=(3)+1; if(rad==1){
throw new jkzkException("你有病 "); }else{
"身体健康不用治疗"); } } }
class jkzkException extends Exception{
private String messae;
public jkzkException(String messae){
=messae; }
public String getMessage(){
return messae; } }
class Ys{
public void cure(Worker worker){
} }
Random random=new Random();
int rad=(2)+1; if(rad==1){
("健康"); }else{
("死亡"); }
本文来源:https://www.wddqxz.cn/35e841a1ecfdc8d376eeaeaad1f34693dbef1030.html