Topic: "field"在java中是什么意思啊? |
Print this page |
1."field"在java中是什么意思啊? | Copy to clipboard |
Posted by: snoopy_6699 Posted on: 2005-03-05 22:05 What happens if you want to give a variable an initial value? One direct way to do this is simply to assign the value at the point you define the variable in the class. (Notice you cannot do this in C++, although C++ novices always try.) Here the field definitions in class InitialValues are changed to provide initial values: 当中的“field”在java中是什么术语啊?谢谢 |
2.Re:"field"在java中是什么意思啊? [Re: snoopy_6699] | Copy to clipboard |
Posted by: aaron_go Posted on: 2005-03-07 20:39 field的意思是“字段”,这里可以理解成变量。我认为面向对象的语言(比如Java)中的字段也就是传统所谓的变量(variable),至于具体的区别就不知道了。汗... |
3.Re:"field"在java中是什么意思啊? [Re: snoopy_6699] | Copy to clipboard |
Posted by: VirusCamp Posted on: 2005-03-10 10:51 不同意aaron_go . field的解释: class A{ private int a; //private field私有域 protected double b; //protected field保护域 public String c; //public field公共域 A d; //default access field默认访问域 public static Object e; //public static field公共静态域 ..... } |
4.Re:"field"在java中是什么意思啊? [Re: snoopy_6699] | Copy to clipboard |
Posted by: snoopy_6699 Posted on: 2005-03-16 09:42 谢谢诸位大虾的指点 |
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 |