[英]Can someone explain this weird String things in GWT?
I used String s="";
我使用String s="";
, List<String>
etc in my Gwt projects & i had no error message what so ever. ,我的Gwt项目中的List<String>
等&我没有任何错误消息。
However, when i used String str=myTextBox.getText();
但是,当我使用String str=myTextBox.getText();
then eclipse gave an error saying that "Can not Cast from java.lang.String to String. So I changed to java.lang.String str=myTextBox.getText();
then error was disappeared. 然后eclipse给出一个错误,指出“无法从java.lang.String转换为String。所以我将其更改为java.lang.String str=myTextBox.getText();
然后错误消失了。
Question: what r the differences between String in String s="";
问题: String s="";
中的String s="";
之间的区别是什么String s="";
, List<String>
& String in java.lang.String str=myTextBox.getText();
, List<String>
和java.lang.String str=myTextBox.getText();
中的java.lang.String str=myTextBox.getText();
in my project? 在我的项目中?
So Gwt uses different String from core Java String? 那么Gwt使用的Java String与核心Java String不同吗?
Can anyone explain this? 谁能解释一下?
GWT supports most of the core Java language syntax and semantics, but there are a few differences you will want to be aware of. GWT支持大多数核心Java语言语法和语义,但是您需要注意一些差异。 try check this https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility 尝试检查此https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.