List of usage examples for java.nio CharBuffer equals
public boolean equals(Object other)
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(50); cb1.append("java2s.com"); cb1.rewind();/* w ww . j av a 2 s . c om*/ System.out.println(Arrays.toString(cb1.array())); CharBuffer cb2 = cb1.slice(); System.out.println(cb2.equals(cb1)); }