[Interview IO] Chapter 11 Java IO

1. What is a bit (Bit), what is a byte (Byte), what is a character (Char), what are their lengths, and what are the differences

  1"Bit is the smallest binary unit, which is the value of 0 or 1 in the operation part of the computer.
  2"Byte is the smallest unit of computer operation data. It is composed of 8 bits and takes the value (-128-127)
  3"Char is the user's readable and writable value. The smallest unit of , in Java , it is composed of 16-bit values ​​(0-65535)

  Bit is the smallest unit, a computer can only recognize 0 or 1 

  8bit is a byte for the computer to see, a
  character is what you see, a character = two bytes

===============================================================

2. What is a stream, which two streams are divided into according to the unit of transmission, and what is their parent class called? Stream refers to the transmission of data

  1" stream is divided into byte stream and character stream

  2" Byte stream inherits inputStream and OutputStream

  3" The character stream inherits from InputSteamReader and OutputStreamWriter

 

===============================================================

3. Which two streams can be divided into according to the direction of transmission, and give examples respectively

  1" input and output relative to the program
  2 "input stream InputStream
  3" output stream OutputStream

===============================================================

4. According to the realization of which two kinds of functions are divided, give examples respectively

  1" According to the implementation function, it is divided into [node stream] [processing stream]
  2" node stream: OutputStream
  3" processing stream: OutputStreamWriter

 

===============================================================

 

 

 

===============================================================

 

 

 

===============================================================

 

 

 

===============================================================

 

 

 

===============================================================

 

 

 

===============================================================

 

 

 

===============================================================

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324729035&siteId=291194637