Pertanyaan
Datalnput dan DataOutput objects bertanggung jawab atas Select one: a. pembacaan berbagai data referensi b. pembacaan dan penulisan berbagai data tekstual c. pembacaan dan penulisan berbagai data primitif d. penuisan berbagai data primitif
Solusi
Jawaban
c.
Penjelasan
DataInput and DataOutput interfaces in Java are responsible for reading and writing of primitive data types (int, long, float, double, byte, char, boolean...) in a platform-independent manner. DataInput consists methods for reading primitive types and have given below, Like boolean readBoolean(), byte readByte(), char readChar(), double readDouble(), etc. DataOutput provides methods for converting primitive Java data types to a series of bytes and then writing these bytes to a binary stream. With DataOutput, we will be able to use the methods like Double(double v), writeFloat(float v), writeInt(int v) and so on. Answer 'c' corresponds to these functionalities.