Topic: String[] myString 和 String myString[] 有何区别?

  Print this page

1.String[] myString 和 String myString[] 有何区别? Copy to clipboard
Posted by: littledeer1974
Posted on: 2005-10-05 21:38

Dead
如题

看别人的程序,里边把
String的数组,定义成了

String myString[]的形式,怎么觉得有点别扭呢。
大家帮我清理一下脑袋,有点晕了。Dead

2.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: ranchgirl
Posted on: 2005-10-05 22:25

They are the same in Java or C++.

However, String[] myString is generally considered to be better.

String myString[] is illegal In C#, a great overdue improvement!!!

You'd better write this way!!!

String[] myString;


Thanks!

3.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: truthawp
Posted on: 2005-10-06 18:52

好象只是写法习惯上JAVA与C++的区别吧! 应该是个人习惯,我一直写成String myString[],没遇到什么错

4.Re:String[] myString 和 String myString[] 有何区别? [Re: truthawp] Copy to clipboard
Posted by: ranchgirl
Posted on: 2005-10-06 20:16

truthawp wrote:
好象只是写法习惯上JAVA与C++的区别吧! 应该是个人习惯,我一直写成String myString[],没遇到什么错


I really hate "好象" in technical forums!!!!

If you know it, you don't need "好象"!!!

If you are not sure, don't say anything! Do some research until you are sure. You only post when you are sure again! You still don't need "好象"!!!

This "好象" made Chinese forums 乌烟瘴气!!! Sigh! Sad
===================

These two ways mean the same in C++ and Java. However, one is illegal in C# now.

String yourString[]; // not compilable in C#, but it is OK in C++/Java
String[] myString; // compilable in C#, C++ and Java, since it is better and clearer!

5.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: ranchgirl
Posted on: 2005-10-06 20:27

"好象" allows people say something without take responsibility!!!!

This "好象" is unique in Chinese forums! Who said we don't have anything unique???

Sigh.....

6.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: truthawp
Posted on: 2005-10-07 12:23

Embaressed I'll take your advice.My apology.

7.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: ranchgirl
Posted on: 2005-10-07 13:33

Thank you so much! Thank you!

8.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: aqing50
Posted on: 2005-10-15 10:31

两者没什么差别吧

9.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: linjie1918
Posted on: 2005-10-15 22:41

I LOVE USE String myString []

10.Re:String[] myString 和 String myString[] 有何区别? [Re: littledeer1974] Copy to clipboard
Posted by: rhvic
Posted on: 2005-10-15 22:59

我习惯使用String myString[]
两者都可以
个人习惯问题
『我是指再JAVA中』


   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