java中变量的几种名称fileds,parameters,arguments
2016-03-18 21:32
579 查看
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调用方法或者构造器时传入的参数。
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对世界各个时区(TimeZone)的通用转换处理方法(转载)
- java-注解annotation
- java-模拟tomcat服务器
- java-用HttpURLConnection发送Http请求.
- java-WEB中的监听器Lisener
- Android IPC进程间通讯机制
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- 介绍一款信息管理系统的开源框架---jeecg
- 聚类算法之kmeans算法java版本
- java实现 PageRank算法
- PropertyChangeListener简单理解
- c++11 + SDL2 + ffmpeg +OpenAL + java = Android播放器
- 插入排序
- 冒泡排序
- 堆排序
- 快速排序
- 二叉查找树