Example usage for java.nio DoubleBuffer compareTo

List of usage examples for java.nio DoubleBuffer compareTo

Introduction

In this page you can find the example usage for java.nio DoubleBuffer compareTo.

Prototype

public int compareTo(DoubleBuffer otherBuffer) 

Source Link

Document

Compare the remaining doubles of this buffer to another double buffer's remaining doubles.

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleBuffer bb = DoubleBuffer.allocate(BSIZE);

    bb.put(98765);//  w w  w  . ja  va2  s .  com

    DoubleBuffer bb1 = bb.compact();

    System.out.println(Arrays.toString(bb1.array()));

    System.out.println(bb.compareTo(bb1));

}