KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to add an element to Array specifying position and value. For example, I have Array int []a = {1, 2, 3, 4, 5, 6}; after applying addPos(int 4, int 87) it should be int []a = {1, 2, 3, 4, 87, 5}; I understand that here should be a shift of Array's indexes, but don't see how to implement it in code.
Tags (comma-separated)
Save Edits
Cancel