import java.util.*;public class lianxi4 {class kehu{public String xm;public int nl;public boolean hyk;public void showInfo(){System.out.println(xm+"\t"+nl+"\t"+hyk);}}public class kehuBiz{kehu[] kehusz=new kehu[30];public void lianxi4(kehu kh) {for(int i=0;i<kehusz.length;i++){if(kehusz[i]==null){kehusz[i]=kh;break;}}}// TODO Auto-generated constructor stub}/*** @param args*/public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println("客户信息:");lianxi4 khxx1=new lianxi4();String xm1="王一";int nl1=30;boolean hyk1=false;khxx1.nl=0; //nl显示红色下划线怎么办?}}我想在入口调用class中的nl该怎么做?想要调用其中的方法又该怎么做?
添加回答
举报
0/150
提交
取消