JiafanZhou
版主
发贴: 736
积分: 61
|
于 2008-07-16 16:05
臧圩人 wrote: 2、“方法的情况下”不是一段话的开头,而是连着前面的句子的,只是被一个方法的定义隔开了,你连着读就通顺了。
The reason that I have been so strict on this is because we need to make sure all levels of Java programmers can understand your words without any problems. And we should really avoid that happening. (i.e. we should never have our paragraphs slitted by some code. What happened if the code is really long?? People will get lost.
臧圩人 wrote: 3、关于为什么没有解释“作用域”的概念。我写的这一系列文章是以面试题为出发点,讲解JAVA的基础知识,尽量做到清晰和深入。但是与JAVA入门教材的出发点不同,而是更多地针对面试题,因此不会涵盖所有JAVA基础内容,比如什么叫变量、for语句如何使用、怎样定义数组这些都不会包含。
Again, it is really a mistake that talking about some terminologies without mentioning it first. Or you should simply mention something like "这篇文章假设读者已经对‘什么叫变量、for语句如何使用、怎样定义数组,和Java作用域’这些概念了解了“. In that case, people who do not understand those terms can look up for them first. Also you push the responsibilities into readers.
臧圩人 wrote: 4、我在浏览这篇帖子时,图片是可以正常显示的,不知你那里是不是网络慢的原因?
Now, up to today. 16/07/2008, I can see the first image, but the second image is still not displayed
臧圩人 wrote: 5、b &= false;类似于i+=2;,可以编译并执行,你所指的错误是什么呢?
Why do you use b &= false????????? I have never seen some code like that to assign a boolean value to a variable. Maybe it can pass the compiler, but it is really confusing.
Can somebody else give comments on this code? Maybe I am out of style.
6、回到这篇文章最核心的问题,值传递和引用传递的概念。
我觉得区分引用传递不应该从传了引用本身还是引用的拷贝来区分。值是什么呢?我觉得理解为数值更为准确。引用不是值,引用的拷贝还是引用,也不是值。就像对象不是值,对象的拷贝还是对象,而不是值。我们不能但从拷贝这一个动作来区分值和引用的概念。
因此,我觉得用引用传递来区别与值传递,概念上更加清晰。
By definition, all text books define Java as only "passing-by-value". I totally understand what you explained here and they are right. BUT.... you cannot say Java pass parameter as "pass-by-reference", the reason I have explained in my last comment.
Also, if I was the interviewer and I heard some interviewee said "Java passes method parameters by reference". Immediately I will raise a red flag in my mind to question about "Is he/she really understanding Java?" Because it is technically wrong.
Jiafan
When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.
|