Java Roadmap

Day 25: Simple Class

Create a basic class with attributes and methods.

  • Create a User class with the following fields: id (int), firstname, lastname, email, city, country
  • Add a constructor to initialise an User object
  • Implement getters and setters to access User values
  • Implement a getFullname() method to get fullname (i.e firstname + lastname) of the user

Sponsor Us|Community|Blog|Youtube
Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
100DaysOfCode@2024