Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8683725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:07:16+00:00 2026-06-12T22:07:16+00:00

I’m wondering if i can have an array ( or basically a table )

  • 0

I’m wondering if i can have an array ( or basically a table ) with each of its element being a set of objects of different types. I mean i want to create something like this ( i know it’s incorrect in syntax, just wanna demonstrate my idea ) :

List<String, int, double, Date, ... , etc > list_name

I’m doing this to ensure that when I save all these information to my database, i will have all these information in the same entry in the database. This is because i did some web scraping from different sites to gather all these data, i.e. in the list, string may be from site A, int may be from site B, etc. I found some information may be missed for some reasons ( say, for a particular element of the list, String from site A may be missing, other data are just there, perfectly fine. ). If i store these data into seperated lists, i’m afraid there will be some mismatch of data.

Now my solution is to create a class, say ClassA :

ClassA{

public String info1
public int info2
public double info3
..
..
public wtever info

}

and then i will have a of list of ClassA

I’m wondering if there is a better way to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:07:17+00:00Added an answer on June 12, 2026 at 10:07 pm

    I’m doing this to ensure that when I save all these information to my database, i will have all these information in the same entry in the database.

    Yes, you’ve done the correct thing by creating a class to hold all the values.

    And, as you’ve already noted, you can then create a List of this objects if you wish to perform multiple database insertions/updates.

    Many persistence schemes operate on the basis of defining classes (known as DAOs) to represent the data stored in individual tables. Using a persistence provider that supports annotating classes (such as Hibernate) can really simplify your interaction with a database. I’d recommend you research this topic in more detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have an array which has BIG numbers and small numbers in it. I
I'm trying to select an H1 element which is the second-child in its group
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.