Home > Back-end > Dear bosses, what reason is this an array?
Dear bosses, what reason is this an array?
Time:09-24
import java.util.*;
CodePudding user response:
In the n=in nextInt (); After additional A=new int [n].
You must think you are a is static, and a new start, why still need to new? If you can understand the following code to understand why, int n=0; Int a []=new int [n].//a length is how many? Int b=n;//b? N=5;//change after n b changed? The length of a changed?