在java中,而不是在c#中 [英] In java, not in c#
本文介绍了在java中,而不是在c#中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
创建方法BBB
private String BBB(String s)
{
返回s +" hello";
}
然后调用方法
String BBB = BBB(公司);
这适用于java,但不适用于c#;
解决方案
您是否在提问或者只是告诉我们这些信息?
" John Bailo" < JA ***** @ earthlink.net>在消息中写道
新闻:2s ************* @ uni-berlin.de ...
创建一个方法BBB
私人字符串BBB(字符串s)
{
返回s +" hello" ;;
}
然后调用方法用
字符串BBB = BBB(公司);
这适用于java,但不适用于c#;
您是在问一个问题,还是只是告诉我们这些信息?
" John Bailo" < JA ***** @ earthlink.net>在消息中写道
新闻:2s ************* @ uni-berlin.de ...
创建一个方法BBB
私人字符串BBB(字符串s)
{
返回s +" hello" ;;
}
然后调用方法用
字符串BBB = BBB(公司);
这适用于java,但不适用于c#;
< br>
" John Bailo" < JA ***** @ earthlink.net>在消息中写道
新闻:2s ************* @ uni-berlin.de ...
创建一个方法BBB
私人字符串BBB(字符串s)
{
返回s +" hello" ;;
}
然后调用方法用
字符串BBB = BBB(公司);
这适用于java,但不适用于c#;
既然''company''是一个未声明的变量,它也不会编译。
也许你想构建一个完整的例子?
Create a method BBB
private String BBB(String s)
{
return s + "hello";
}
Then call the method with
String BBB = BBB(company);
This will work in java, but not in c#;
解决方案
Are you asking a question, or just telling us this information?
"John Bailo" <ja*****@earthlink.net> wrote in message
news:2s*************@uni-berlin.de...
Create a method BBB
private String BBB(String s)
{
return s + "hello";
}
Then call the method with
String BBB = BBB(company);
This will work in java, but not in c#;
Are you asking a question, or just telling us this information?
"John Bailo" <ja*****@earthlink.net> wrote in message
news:2s*************@uni-berlin.de...
Create a method BBB
private String BBB(String s)
{
return s + "hello";
}
Then call the method with
String BBB = BBB(company);
This will work in java, but not in c#;
"John Bailo" <ja*****@earthlink.net> wrote in message
news:2s*************@uni-berlin.de...
Create a method BBB
private String BBB(String s)
{
return s + "hello";
}
Then call the method with
String BBB = BBB(company);
This will work in java, but not in c#;
Since ''company'' is an undeclared variable, it won''t compile in either.
Perhaps you''d like to construct a complete example?
这篇关于在java中,而不是在c#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文