java - How to increase an array's length - Stack Overflow sbgHeadX = new int[ numberOfSBG ] ... I would suggest you use an ArrayList as you won't have to worry about the length anymore. Once created, you can't modify an ...