CrazyEngineers
  • Adding different type of objects in a List (Java)?

    manishks

    Member

    Updated: Oct 26, 2024
    Views: 1.2K
    Is it possible? And if yes how can I access them in JSP? Can any one help me with this? 😀
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Vishal Sharma

    MemberSep 2, 2015

    manishks
    Is it possible? And if yes how can I access them in JSP? Can any one help me with this? 😀
    Not a fan of JSP to give you a code snippet, but yes you can do that.
    Please try to search.
    Are you sure? This action cannot be undone.
    Cancel
  • Anoop Kumar

    MemberSep 2, 2015

    List <Object> = new ArrayList <Object>;
    Problem is, if there are different type of object, how you are going to retrieve it?
    You need to know what kind of object you put at specific location. while casting back.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register