Topic: 问题很弱!!main()为什么总爱写在后面那?? |
Print this page |
1.问题很弱!!main()为什么总爱写在后面那?? | Copy to clipboard |
Posted by: guowei1982 Posted on: 2005-12-31 20:31 初学java 一般主函数都爱写在程序后边,为什么不写在一开始????? 是习惯 还是一种规范 还是另有秒用??? 祝大家新年快乐!!! |
2.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: guowei1982] | Copy to clipboard |
Posted by: wukw Posted on: 2005-12-31 20:48 这个问题有点意思~ 我想也许是为了调用上面的函数绝对没问题吧~ |
3.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: guowei1982] | Copy to clipboard |
Posted by: why Posted on: 2005-12-31 22:50 寫在前後只是習慣吧 不論放在前後,调用上面下面的函数绝对没问题的 |
4.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: guowei1982] | Copy to clipboard |
Posted by: ranchgirl Posted on: 2006-01-01 04:55 Q. Why Java does this? Why Java does that? A:To computer languages or natural languages, I always prefer to ask what and how instead of why. Even though I know there are a lot of good and bad reasons behind them. The good ones make the language vital and successful, the bad ones make future improvement and replacement possible. Languages (natural and programming languages included) are not rigorous science, a lot of human factors are involved. To programming languages, another factor is the cost. This is a more philosophical and time-efficient decision of mine. You can make yours different than mine, of course. Sorry, it is usually not a very satisfactory answer for you. Copied from http://bobcat.webappcabaret.net/javachina/faq/09.htm#mis_Q40 |
5.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: guowei1982] | Copy to clipboard |
Posted by: ranchgirl Posted on: 2006-01-01 04:59 Mr. Smith 李先生 WHY??? |
6.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: why] | Copy to clipboard |
Posted by: wukw Posted on: 2006-01-01 12:59 why wrote: 调用上下函数是没有问题,但是调用类不见得没问题。 有一次我用Javac *.java,说是XXX.class不存在。但是按顺序挨个编译就没问题。莫名其妙!看来javac还是有点问题的,做的不是太好。所以我想main写在后面是不是也是因为这个原因。 |
7.Re:问题很弱!!main()为什么总爱写在后面那?? [Re: wukw] | Copy to clipboard |
Posted by: ranchgirl Posted on: 2006-01-02 01:52 wukw wrote: Yes, javac class dependency checking is not very strong. I am glad you have noticed that. There is a good opensource software, it is very good, please try it! http://classycle.sourceforge.net/usageDChecker.html wukw wrote: NO, ABSOLUTELY NOT! You can put main anywhere you want! Some author puts main at the beginning all the time. |
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 |