Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java IOÊáÀí

JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£ Á÷ÊÇÒ»¸öºÜÐÎÏóµÄ¸ÅÄµ±³ÌÐòÐèÒª¶ÁÈ¡Êý¾ÝµÄʱºò£¬¾Í»á¿ªÆôÒ»¸öͨÏòÊý¾ÝÔ´µÄÁ÷£¬Õâ¸öÊý¾ÝÔ´¿ÉÒÔÊÇÎļþ£¬Äڴ棬»òÊÇÍøÂçÁ¬½Ó¡£ÀàËƵģ¬µ±³ÌÐòÐèҪдÈëÊý¾ÝµÄʱºò£¬¾Í»á¿ªÆôÒ»¸öͨÏòÄ¿µÄµØµÄÁ÷¡£ÕâʱºòÄã¾Í¿ÉÒÔÏëÏóÊý¾ÝºÃÏñÔÚÕâÆäÖГÁ÷”¶¯Ò»Ñù£¬ÈçÏÂͼ£º
 JavaÖеÄÁ÷·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇ×Ö½ÚÁ÷£¬ÁíÒ»ÖÖÊÇ×Ö·ûÁ÷£¬·Ö±ðÓÉËĸö³éÏóÀàÀ´±íʾ£¨Ã¿ÖÖÁ÷°üÀ¨ÊäÈëºÍÊä³öÁ½ÖÖËùÒÔÒ»¹²Ëĸö£©:InputStream£¬OutputStream£¬Reader£¬Writer¡£JavaÖÐÆäËû¶àÖÖ¶àÑù±ä»¯µÄÁ÷¾ùÊÇÓÉËüÃÇÅÉÉú³öÀ´µÄ:
 
ÔÚÕâÆäÖÐInputStreamºÍOutputStreamÔÚÔçÆÚµÄJava°æ±¾ÖоÍÒѾ­´æÔÚÁË£¬ËüÃÇÊÇ»ùÓÚ×Ö½ÚÁ÷µÄ£¬¶ø»ùÓÚ×Ö·ûÁ÷µÄReaderºÍWriterÊǺóÀ´¼ÓÈë×÷Ϊ²¹³äµÄ¡£ÒÔÉϵIJã´ÎͼÊÇJavaÀà¿âÖеÄÒ»¸ö»ù±¾µÄ²ã´ÎÌåϵ£¬Èç¹ûÄã¸ÐÐËȤÏëÁ˽â¸ü¶àÄÚÈݵĻ°£¬¿ÉÒÔµ½Sun¹«Ë¾Ö÷Ò³»ñÈ¡¸ü¶àÐÅÏ¢¡£
ÔÚÕâËĸö³éÏóÀàÖУ¬InputStreamºÍReader¶¨ÒåÁËÍêÈ«ÏàͬµÄ½Ó¿Ú£º
int read()
int read(char cbuf[])
int read(char cbuf[], int offset, int length)
¶øOutputStreamºÍWriterÒ²ÊÇÈç´Ë£º
int write(int c)
int write(char cbuf[])
int write(char cbuf[], int offset, int length)
ÕâÁù¸ö·½·¨¶¼ÊÇ×î»ù±¾µÄ£¬read()ºÍwrite()ͨ¹ý·½·¨µÄÖØÔØÀ´¶Áдһ¸ö×Ö½Ú£¬»òÕßÒ»¸ö×Ö½ÚÊý×é¡£
¸ü¶àÁé»î¶à±äµÄ¹¦ÄÜÊÇÓÉËüÃǵÄ×ÓÀàÀ´À©³äÍê³ÉµÄ¡£ÖªµÀÁËJavaÊäÈëÊä³öµÄ»ù±¾²ã´Î½á¹¹ÒԺ󣬱¾ÎÄÔÚÕâÀïÏë¸ø´ó¼ÒһЩÒÔºó¿ÉÒÔ·´¸´Ó¦ÓÃÀý×Ó£¬¶ÔÓÚËùÓÐ×ÓÀàµÄϸ½Ú¼°Æ书Äܲ¢²»ÏêϸÌÖÂÛ
import java.io.*;
public class IOStreamDemo {
      public void samples() throws IOException {
           //1. ÕâÊÇ´Ó¼üÅ̶ÁÈëÒ»ÐÐÊý¾Ý,·µ»ØµÄÊÇÒ»¸ö×Ö·û´®
           BufferedReader stdin =new BufferedReader(new InputStreamReader(System.in));
           S


Ïà¹ØÎĵµ£º

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³É¹¦&nb ......

javaÒ»¸ö¶àÏ̵߳ľ­µäÀý×Ó

import java.io.*;
//¶àÏ̱߳à³Ì 
public class MultiThread   

public static void main(String args[]) 

System.out.println("ÎÒÊÇÖ÷Ïß³Ì!"); 
//ÏÂÃæ´´½¨Ïß³ÌʵÀýthread1 
ThreadUseExtends thread1=new ThreadUseExtends(); 
//´´½¨thread2ʱÒÔʵÏÖÁ ......

ä¯ÀÀÆ÷²»Ö§³ÖjavaµÄ½â¾ö°ì·¨

ä¯ÀÀÆ÷²»Ö§³ÖjavaµÄ½â¾ö°ì·¨2008-07-09 11:45ä¯ÀÀÆ÷²»ÄÜÏÔʾÍøÒ³µÄijЩÄÚÈÝ£¬Ö»ÏÔʾһ¸ö»ÒÉ«µÄ¿ò£¬Ìáʾ²»Ö§³ÖJAVA¡£ ÕâÊÇÒòΪÄúµÄä¯ÀÀÆ÷ÐèÒªÓÐÖ§³ÖJavaµÄ¹¦ÄܲÅÄÜ¿´µ½£¬ÓпÉÄÜÊÇÄãµÄä¯ÀÀÆ÷ûÓа²×°javaÐéÄâ»úµÄÖ§³Ö£¬Ò²ÓпÉÄÜÊÇÄãµÄä¯ÀÀÆ÷½ûÖ¹ÁËJavaµÄ¹¦ÄÜ¡£Çë°´ÏÂÃæÌáʾ´ò¿ªÄãµÄä¯ÀÀÆ÷µÄjavaÉèÖá£
(1)¡¢Èç¹ûÄãµÄ²Ù×÷ÏµÍ ......

Äã»á°²×°JavaÂð£¿

java_home
C:\Program Files\Java\jdk1.6.0_16
Path
%java_home%\bin;%java_home%\lib;
classpath
%java_home%\lib\dt.jar;%java_home%\lib\tools.jar;.;
java_home
C:\Program Files\Java\jdk1.6.0_16
Path
%SystemRoot%\system32;%java_home%\bin;%java_home%\lib;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\P ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ