Activity

  • kamal Kumar posted an update in the group Group logo of Java Interview  QuestionsJava Interview Questions 1 month ago  · 

    How to Increase size of array once defined?

    Java includes a class called Vector that acts much like an array but is expandable. This added capability comes at the expense of some loss of efficiency. You might want to try creating your own vector class. If the class user is about to overflow the internal array in this class, the insertion algorithm creates a new array of larger size, copies the old array contents to the new array, and then inserts the new item. This whole process would be invisible to the class user.