Topic: 又出错了 (cannot resolve symbol 请尽量用准确的文字描述作为标题) |
Print this page |
1.又出错了 (cannot resolve symbol 请尽量用准确的文字描述作为标题) | Copy to clipboard |
Posted by: gaojihui Posted on: 2005-03-31 23:41 又出错了,帮我看看,谢谢! 请尽量用准确的文字描述作为标题 public class teststatic { public static void main(String args[]) { phonecard200 my200_1=new phonecard200(); phonecard200 my200_2=new phonecard200(); System.out.println("first 200 card number:"+my200_1.cardnumber); System.out.println("second 200 card number:"+my200_2.cardnumber); } } class phonecard200 { static long nextcardnumber; static String connectnumber="200"; static double additoryFee; int password; boolean connecten; double balance; static { nextcardnumber=200180001; } phonecard200() { cardnumber=nextcardnumber++; } } |
2.Re:又出错了,帮我看看,谢谢! [Re: gaojihui] | Copy to clipboard |
Posted by: kaiserlew Posted on: 2005-04-01 00:20 class teststatic { public static void main(String args[]) { phonecard200 my200_1=new phonecard200(); phonecard200 my200_2=new phonecard200(); System.out.println("first 200 card number:"+my200_1.cardnumber); System.out.println("second 200 card number:"+my200_2.cardnumber); } } class phonecard200 { static long nextcardnumber; long cardnumber; //here //static String connectnumber="200"; //static double additoryFee; //int password; //boolean connecten; //double balance; static { nextcardnumber=200180001; } public phonecard200() { cardnumber=nextcardnumber++; } } cardnumber还没定义呢 |
3.Re:又出错了 (cannot resolve symbol 请尽量用准确的文字描述作为标题) [Re: gaojihui] | Copy to clipboard |
Posted by: wddodo Posted on: 2005-04-02 14:07 你的变量名字写错了. 声明的变量: static String connectnumber="200"; 你用的是cardnumber |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |