此PHP代码的等效Java是什么?
//print string plus/with variable
$mystring = "this is string " .$string
//print sum one + two
$count = $one + $two
//print sum one*two
$count = $one * $two
答案 0 :(得分:2)
应该是这样的:
String mystring= "this is string " + string; // here `string` is aloso String object
/*
* if count ,one and two all of them are int
*/
int count = one + two;
int count = one * two;
但我建议在启动android之前学习java的基础知识。如你所知,学习java语法不会花费很长时间。