I am trying to work on sending an object of my customer class from one Activity
and display it in another Activity
.
(我正在尝试从一个Activity
发送我的客户类的对象并将其显示在另一个Activity
。)
The code for the customer class:
(客户类的代码:)
public class Customer {
private String firstName, lastName, Address;
int Age;
public Customer(String fname, String lname, int age, String address) {
firstName = fname;
lastName = lname;
Age = age;
Address = address;
}
public String printValues() {
String data = null;
data = "First Name :" + firstName + " Last Name :" + lastName
+ " Age : " + Age + " Address : " + Address;
return data;
}
}
I want to send its object from one Activity
to another and then display the data on the other Activity
.
(我想将其对象从一个Activity
发送到另一个,然后在另一个Activity
上显示数据。)
How can I achieve that?
(我该如何实现?)
ask by kaibuki translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…