题海让大学四年没有难题
白天模式登陆

题目详情

单选题 在Activity A中,想要跳转到Activity B并传递一个字符串数据"username",正确的代码是

A. Intent intent = new Intent(A.this, B.class); intent.putExtra("name", "username"); startActivity(intent)

B. Intent intent = new Intent(A.this, B.class); intent.getStringExtra("name", "username"); startActivity(intent)

C. Intent intent = new Intent(A.this, B.class); intent.getExtra("name", "username"); startActivity(intent)

D. Intent intent = new Intent("username", A.this, B.class); startActivity(intent)

默认课程课程封面

学科:默认课程

时间:2025-12-17 10:25:28

Copyright © 2022 津ICP备2021001502号