How to pass an object from one Activity to another in Android
Hello everyone. I'm a beginner in Android development and I've encountered a problem. I have a User class with fields name, age, and email. In the first Activity (MainActivity), I create a User object and want to pass it to the second Activity (ProfileActivity). I know that through Intent you can pass simple data types (int, String, boolean), but what about objects?\n\nHere is an example of my code:\n\n```java\npublic class User {\n private String name;\n private int age;\n private String email;\n \n public User(String name, int age, String email) {\n this.name = name;\n this.age = age;\n this.email = email;\n }\n \n // getters and setters\n}\n```\n\nIn MainActivity I do this:\n\n```java\nUser user = new User("Ivan", 25, "ivan@example.com");\nIntent intent = new Intent(MainActivit