Modular programming
Divide programs into different modules according to their functions
Different modules of the program are written in different packages,
Common code extracted to form the Util class, in order to facilitate the invocation of the general static
In the early stages of the project, modules were divided into business functions, i.e. top-down approaches. The process of development, according to functional division, that is, the bottom-up approach.
Java input and output stream
try{
FileInputStream in = new FileInputStream (new File (Inpath));
FileOutputStream out = new FileOutputStream (new File (Outpath));
Byte[] b= new byte[1024];
int len = In.read (b);
while (Len!=-1) {
Out.write (b);
}
}catch (FileNotFoundException e) {
E.printstatictrace ();
}finally{
In.close ();
Out.flush ();
Out.close ();
}
Modular development of Java