android编程问题,新手求教!
DimXXAsIntegerDimYYAsIntegerDimJGAsInteger'''''''''''''''''''''''''''''''''''''''''''...
Dim XX As Integer
Dim YY As Integer
Dim JG As Integer
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Command1_Click()
XX = 11
YY = 22
Jia '参数传递过去,调用Jia计算结果
Label1.Caption = "结果等于" & JG
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Jia() ‘
JG = XX + YY
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
android编程,怎么才能实现和上边的VB代码执行得到一样的结果?
能给过实例最好!非常感谢热心的高人! 展开
Dim YY As Integer
Dim JG As Integer
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Command1_Click()
XX = 11
YY = 22
Jia '参数传递过去,调用Jia计算结果
Label1.Caption = "结果等于" & JG
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Jia() ‘
JG = XX + YY
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
android编程,怎么才能实现和上边的VB代码执行得到一样的结果?
能给过实例最好!非常感谢热心的高人! 展开
3个回答
展开全部
main.xml文件中创建一个id为btn的Button
MainActivity.Java:
int XX,YY,JG;
TextView TextView1;
public void btn_Click(View v){
XX=11;
YY=22;
JIA();
TextView1.setText = "结果等于" + JG
}
public JIA(){
JG=XX+YY;
}
差不多就是这样吧
MainActivity.Java:
int XX,YY,JG;
TextView TextView1;
public void btn_Click(View v){
XX=11;
YY=22;
JIA();
TextView1.setText = "结果等于" + JG
}
public JIA(){
JG=XX+YY;
}
差不多就是这样吧
追问
编译不过! 换了好几种写法,都不对。新手,继续努力中...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询