There's a value [1,2,3,4,5] in the array A, and even if you copy the value of A to B and change A to [6,7,8,9,10], B wants to remain as [1,2,3,4,5]
for(int i=0; i<5; i++){ B[i]=A[i] }
I did it like this. Not the way I want to. How shall I do it?
System.arraycopy() method is simple.
int[] src = new int[]{1,2,3,4,5}; int[] dest = new int[5]; System.arraycopy( src, 0, dest, 0, src.length );
You can do it like this.
572 Understanding How to Configure Google API Key
885 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
597 GDB gets version error when attempting to debug with the Presense SDK (IDE)
869 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
577 PHP ssh2_scp_send fails to send files as intended
© 2024 OneMinuteCode. All rights reserved.