Topic: [求助]不知为什么,程序编译错误!

  Print this page

1.[求助]不知为什么,程序编译错误! Copy to clipboard
Posted by: guliusuo
Posted on: 2006-08-24 10:31

public class Person{
public final int MAX_LENGTH=100;
public static void main(String a[]){
System.out.println(MAX_LENGTH);
}
}

程序编译到最后一句话的时候,会出错,不知道是什么原因,
望高手帮忙!!!!

2.Re:[求助]不知为什么,程序编译错误! [Re: guliusuo] Copy to clipboard
Posted by: sumind206xy
Posted on: 2006-08-24 10:49

MAX_LENGTH 是非静态变量

3.Re:[求助]不知为什么,程序编译错误! [Re: guliusuo] Copy to clipboard
Posted by: Skybus
Posted on: 2006-08-24 12:23


public class Person{
public static final int MAX_LENGTH=100;
public static void main(String a[]){
System.out.println(MAX_LENGTH);
}
}

4.Re:[求助]不知为什么,程序编译错误! [Re: guliusuo] Copy to clipboard
Posted by: guliusuo
Posted on: 2006-08-25 08:45

懂了,谢谢各位!


   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