Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

slicing array in java

import java.util.Arrays;
public class SlicingAnArray {
   public static void main(String args[]){
      int intArray[] = {12, 14, 58, 225, 56, 96 , 3, 45, 8 };
      intArray = Arrays.copyOfRange(intArray, 3, 7);
      System.out.println(Arrays.toString(intArray));
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #slicing #array #java
ADD COMMENT
Topic
Name
8+7 =