Is there a way to compare two regions of a char array in Java (or of two different arrays) without creating new objects in the heap? I know I can do something like this: char[] region1 = Arrays.copyOfRange(bigbuffer,0,100); char[] region2 = Arrays.copyOfRange(bigbuffer,100,200); if (Arrays.equals(region1,region2)) System.out.printf("Equal"); But that will create two objects that later have to […]
The post Compare two regions of char array in Java without creating new objects appeared first on BlogoSfera.