In this tutorial you will see how to wraps a double array into a buffer. The
public static
DoubleBuffer wrap(double[] array) method allow double array to wrap
it into a buffer.
|
import java.nio.DoubleBuffer; public class DoubleBufferDemo { public static void main(String[] args) { double[] ch = new double[] { 121.323, 2323.243, 32353.4, 432.45, 453.756 }; DoubleBuffer doublebuffer = DoubleBuffer.wrap(ch); System.out.println(doublebuffer.get(1)); } } |
| 2323.243 |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.