Here I go!! But you must not bring the idea of php to learn java.
Many operations in php have system library functions that can complete tasks straightforwardly. This is also the reason why PHP has high development efficiency.
For example: file_get_contents, file_put_contents etc. You can even send network requests directly.
None of these functions are native in Java. You must either use a third-party class library or write it yourself.
Java file operations are completed through the two class libraries java.io and java.nio. They all provide relatively low-level abstractions.
java.io operations abstract io operations into streams
java.nio operations abstract io interactions into channels
Here I go!! But you must not bring the idea of php to learn java.
Many operations in php have system library functions that can complete tasks straightforwardly. This is also the reason why PHP has high development efficiency.
For example:
file_get_contents
,file_put_contents
etc. You can even send network requests directly.None of these functions are native in Java. You must either use a third-party class library or write it yourself.
Java file operations are completed through the two class libraries
java.io
andjava.nio
. They all provide relatively low-level abstractions.java.io operations abstract io operations into streams
java.nio operations abstract io interactions into channels
You will know after you research it yourself.