200+ câu trắc nghiệm Lập trình cho di động có đáp án - Phần 5

Dòng code nào sau đây được dùng để bắt đầu Activity2 từ một Activity1 đang chạy?

12/40

Dòng code nào sau đây được dùng để bắt đầu Activity2 từ một Activity1 đang chạy?

Intent intent = new Intent(this, new Activity2()); startActivity(intent);

Intent intent = new Intent(new Activity2()); startActivity(intent);

Intent intent=new Intent(Activity1.class, Activity2.class); startActivity(intent);

Intent intent = new Intent(this, Activity2.class); startActivity(intent);

Giải thích

Chọn đáp án D