Java IO is an example of computer search and deletion
I Recursive method @ h_ 301_ 4@
1. Recursion is to call its own method on the premise that there is a method.
2. Recursive use
Find the law of recursion @ h_ 301_ 15 @ recursion must have an exit condition, that is, an end condition
3. Precautions
The number of recursions cannot be too many, otherwise stack overflow will occur @ H_ 301_ 15 @ recursion cannot be nested, otherwise dead recursion will occur
II IO introduction @ h_ 301_ 4@
1. I is input and O is output. The API encapsulates the input and output streams into a class separately, providing a large number of methods for us to use.
2. IO technology can write data to persistent devices (including hard disk, optical disk, USB flash disk, etc.). Although sets and arrays can be stored and read, they are only temporarily stored in memory. When the program is restarted, they do not exist.
3. Compared with the reference of memory, reading the hard disk into memory is called input stream. Writing data from memory to hard disk is called output stream.
III @ h code to realize the function of computer search_ 301_ 4@
1. Search for folders with custom suffixes
2. Search for folders with custom suffixes
IV The code realizes the complete deletion function of the computer @ h_ 301_ 4@
Note: delete in Java does not go to the recycle bin. Please use it carefully@ H_ 301_ 4@
The above is the whole content of the example of Java IO realizing computer search and deletion function brought by Xiaobian. I hope you can support more programming tips~