java中变量的几种名称fileds,parameters,arguments
来源:互联网 发布:更新mac系统版本出错 编辑:程序博客网 时间:2024/05/20 02:25
java中的变量有好几种类型(此处的类型不是指type,基础类型或者某个java对象),可以根据变量的声明位置和变量的出现时间分类,以下英文摘自oracle的官方JDK tutorial。使用单词可以更清晰的理解变量。
There are several kinds of variables:
Member variables in a class—these are called fields.
Variables in a method or block of code—these are called local variables.
Variables in method declarations—these are called parameters.
Note: Parameters refers to the list of variables in a method declaration. Arguments are the actual values that are passed in when the method is invoked. When you invoke a method, the arguments used must match the declaration’s parameters in type and order.
java中变量(variables)按照其声明的位置可以分为以下几种:
1、fields. 字段。声明在类里面。
2、parameters 参数。声明在方法或者构造器的()里。
3、local variables 本地变量。 声明在方法体里或者构造器里。
以上都是静态变量的名称。
arguments:(英文解释中不是argument的复数)
是java在runtime的时候,JVM调用方法或者构造器时传入的参数。
- java中变量的几种名称fileds,parameters,arguments
- Parameters, Arguments
- Java反射基础(二)--Fileds对象的使用
- Java获取函数参数名称的几种方法
- JS ES6中Arguments和Parameters用法解析
- Java变量交换的几种方式
- 将arguments属性转换成Array的几种方法
- java中变量名字(标示符名称)的命名规则
- Accessing command line parameters/arguments
- kettle Variables+Arguments+Parameters简介
- Java中局部变量和成员变量的几点区别
- 几种轨道名称的缩写
- awk引用shell中变量的几种方法
- PHP中判断变量为空的几种方法
- PHP中判断变量为空的几种方法
- PHP中判断变量为空的几种方法
- PHP中判断变量为空的几种方法
- php中变量传递的几种办法
- Vim 的 Python 编辑器详细配置过程 (Based on Ubuntu 12.04 LTS)
- 发布自己的库到Cocoapods上, Pods install 自己的库
- iOS基本动画
- 海潮负荷模型ES2012
- android学习——activity生命周期和切换逻辑
- java中变量的几种名称fileds,parameters,arguments
- jquery实现全选和反选
- UVA 1515 (最小割)
- 299. Bulls and Cows
- HDOJ 3788 ZOJ问题
- Leetcode:228. Summary Ranges(JAVA)
- 学生管理新系统(C++版)
- Apache kafka工作原理
- B-树和B+树的应用:数据搜索和数据库索引