博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
“参数”vs“参数”[重复]
阅读量:2290 次
发布时间:2019-05-09

本文共 654 字,大约阅读时间需要 2 分钟。

本文翻译自:

Possible Duplicate: 可能重复:

I got parameter and argument kind of mixed up and did not really pay attention to when to use one and when to use the other. 我得到了参数参数类型的混合,并没有真正注意何时使用一个以及何时使用另一个。

Can you please tell me? 你能告诉我吗?


#1楼

参考:


#2楼

A parameter is the variable which is part of the method's signature (method declaration). 参数是变量,它是方法签名(方法声明)的一部分。 An argument is an expression used when calling the method. 参数是调用方法时使用的表达式。

Consider the following code: 请考虑以下代码:

void Foo(int i, float f){    // Do things}void Bar(){    int anInt = 1;    Foo(anInt, 2.0);}

Here i and f are the parameters, and anInt and 2.0 are the arguments. 这里if是参数, anInt2.0是参数。

转载地址:http://hicnb.baihongyu.com/

你可能感兴趣的文章
查看MYSQL表占用空间状态
查看>>
动态库路径配置- /etc/ld.so.conf文件
查看>>
实例讲一讲美国鞋码宽度
查看>>
磁盘空间满故障排除
查看>>
理解MySQL数据类型 避免数据库设计出现混乱
查看>>
大师兄Smarty教程-阅读笔记
查看>>
Linux系统分区的类型
查看>>
ajax+jquery+flea+smarty实现了通过选择下拉列表动态显示相应的数据
查看>>
推荐一个Jquery插件:autoComplete
查看>>
番茄的表单验证类
查看>>
[Java并发编程实战] 第7章 取消与关闭
查看>>
[Java并发编程实战] 第8章 线程池的使用
查看>>
[Java并发编程实战] 第9章 图形用户界面应用程序
查看>>
[Java并发编程实战] 第10章 避免活跃性危险
查看>>
[Java并发编程实战] 第11章 性能与可伸缩性
查看>>
[Java并发编程实战] 第12章 并发程序的测试
查看>>
[Java并发编程实战] 第13章 显式锁
查看>>
[Java并发编程实战] 第14章 构建自定义的同步工具
查看>>
[Java并发编程实战] 第15章 原子变量与非阻塞同步机制
查看>>
[高性能MySQL] 第1章 MySQL架构与历史
查看>>