dynamic array of string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nikkhah
    New Member
    • Apr 2010
    • 12

    dynamic array of string

    Hi. I want to store URLs and Title of every URLs in a String array. I don't know how many URLs are found. I must to use dynamic array of strings but I don't know how sholud allocate? could you help me?
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Why you want to use arrays? Why not hashmap or hashtable or other collection framework which suits your need?

    Regards
    Dheeraj Joshi

    Comment

    • Nikkhah
      New Member
      • Apr 2010
      • 12

      #3
      Originally posted by dheerajjoshim
      Why you want to use arrays? Why not hashmap or hashtable or other collection framework which suits your need?

      Regards
      Dheeraj Joshi
      what's the diffrences between array and hash table?and why hashtable is better than array?

      Comment

      • Dheeraj Joshi
        Recognized Expert Top Contributor
        • Jul 2009
        • 1129

        #4
        You want to store URL and title of the URL.
        You can store them in key value pairs in hash table.
        If you want to achieve this using arrays then you need a 2D array where URL and URL title.

        Please Google yourself to learn more about collection framework in Java

        Comment

        Working...