JAVA²Ù×÷Îļþ£¨´´½¨¡¢É¾³ý¡¢¸´ÖÆ¡¢¼ôÇУ©
package fileTest;
import java.io.*;
public class FileOperate {
public FileOperate() {
}
public static void main(String args[]){
// newFolder("D:/100");
moveFile("e:/9787030230621-tu06110101(sq) 1.pdf","d:/9787030230621-tu06110101(sq) 1.pdf");
}
/**
* н¨Ä¿Â¼
* @param folderPath String Èç c:/fqf
* @return boolean
*/
public static void newFolder(String folderPath) {
try {
String filePath = folderPath;
filePath = filePath.toString();
java.io.File myFilePath = new java.io.File(filePath);
if (!myFilePath.exists()) {
myFilePath.mkdir();
}
}
catch (Exception e) {
System.out.println("н¨Ä¿Â¼²Ù×÷³ö´í");
e.printStackTrace();
}
}
/**
* н¨Îļþ
* @param filePathAndName String Îļþ·¾¶¼°Ãû³Æ Èçc:/fqf.txt
* @param fileContent String ÎļþÄÚÈÝ
* @return boolean
*/
public static void newFile(String filePathAndName, String fileContent) {
Ïà¹ØÎĵµ£º
¹¤³ÌĿ¼½á¹¹ÈçÏ£º
HStudy
--src
--jvm
&nbs ......
Java²»ÊÇÍêÃÀµÄ£¬JavaµÄ²»×ã³ýÁËÌåÏÖÔÚÔËÐÐËÙ¶ÈÉÏÒª±È´«Í³µÄC++ÂýÐí¶àÖ®Í⣬JavaÎÞ·¨Ö±½Ó·ÃÎʵ½²Ù×÷ϵͳµ×²ã£¨ÈçϵͳӲ¼þµÈ)£¬Îª´ËJavaʹÓÃnative·½·¨À´À©Õ¹Java³ÌÐòµÄ¹¦ÄÜ¡£
¡¡¡¡¿ÉÒÔ½«native·½·¨±È×÷Java³ÌÐòͬ£Ã³ÌÐòµÄ½Ó¿Ú£¬ÆäʵÏÖ²½Ö裺
¡¡¡¡£±¡¢ÔÚJavaÖÐÉùÃ÷native()·½·¨£¬È»ºó±àÒ룻
¡¡¡¡£²¡¢ÓÃjavah²úÉúÒ»¸ö.hÎ ......
һЩjavaÀàÖÐΪʲôÐèÒªÖØÔØ serialVersionUID ÊôÐÔ¡£
ÔÚJavaÖУ¬Èí¼þµÄ¼æÈÝÐÔÊÇÒ»¸ö´óÎÊÌ⣬ÓÈÆäÔÚʹÓõ½¶ÔÏó´®ÐÐÐÔµÄʱºò£¬ÄÇôÔÚijһ¸ö¶ÔÏóÒѾ±»´®Ðл¯ÁË£¬¿ÉÊÇÕâ¸ö¶ÔÏóÓÖ±»Ð޸ĺóÖØв¿ÊðÁË£¬ÄÇôÔÚÕâÖÖÇé¿öÏ£¬ ÓÃÀÏÈí¼þÀ´¶ÁÈ¡ÐÂÎļþ¸ñʽËäÈ»²»ÊÇʲôÄÑÊ£¬µ«ÊÇÓпÉÄܶªÊ§Ò»Ð©ÐÅÏ¢¡£
serialVersionUID À´½â¾öÕâЩΠ......
public class Migong {
private int gard[][]={ {1,1,1,1,0,1,1,1},
{0,0,0,1,1,1,1,1},
......
ÊÀ½çÉϲ¢Ã»ÓгÉΪ¸ßÊֵĽݾ¶£¬µ«Ò»Ð©»ù±¾ÔÔòÊÇ¿ÉÒÔ×ñѵġ£
1¡¢ÔúʵµÄ»ù´¡
Êý¾Ý½á¹¹¡¢ÀëÉ¢Êýѧ¡¢±àÒëÔÀí£¬ÕâЩÊÇËùÓмÆËã»ú¿ÆѧµÄ»ù´¡£¬Èç¹û²»ÕÆÎÕËüÃÇ£¬ºÜÄÑд³ö¸ßˮƽµÄ³ÌÐò¡£³ÌÐòÈËÈ˶¼»áд£¬µ«µ±Äã·¢ÏÖдµ½Ò»¶¨³Ì¶ÈºÜÄÑÔÙÌá¸ßµÄʱºò£¬¾ÍÓ¦¸ÃÏëÏëÊDz»ÊÇÒª»Ø¹ýÍ·À´Ñ§Ñ§ÕâЩ×î»ù±¾µÄÀíÂÛ¡£²»ÒªÒ»¿ªÊ¼¾ÍÈ ......