JavaÖеÄIOÁ÷֪ʶ×ܽᣨת£©
×ܽáÒ»£º
Java IOµÄÒ»°ãʹÓÃÔÔò£º
Ò»¡¢°´Êý¾ÝÀ´Ô´£¨È¥Ïò£©·ÖÀࣺ
1¡¢ÊÇÎļþ£º FileInputStream, FileOutputStream, FileReader, FileWriter
2¡¢ÊÇbyte[]£ºByteArrayInputStream, ByteArrayOutputStream
3¡¢ÊÇChar[]: CharArrayReader, CharArrayWriter
4¡¢ÊÇString: StringBufferInputStream, StringReader, StringWriter
5¡¢ÍøÂçÊý¾ÝÁ÷£ºInputStream, OutputStream, Reader, Writer
¶þ¡¢°´ÊÇ·ñ¸ñʽ»¯Êä³ö·Ö£º
1¡¢Òª¸ñʽ»¯Êä³ö£ºPrintStream, PrintWriter
Èý¡¢°´ÊÇ·ñÒª»º³å·Ö£º
1¡¢Òª»º³å£ºBufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter
ËÄ¡¢°´Êý¾Ý¸ñʽ·Ö£º
1¡¢¶þ½øÖƸñʽ£¨Ö»Òª²»ÄÜÈ·¶¨ÊÇ´¿Îı¾µÄ£©: InputStream, OutputStream¼°ÆäËùÓдøStream½áÊøµÄ×ÓÀà
2¡¢´¿Îı¾¸ñʽ£¨º¬´¿Ó¢ÎÄÓ뺺×Ö»òÆäËû±àÂ뷽ʽ£©£»Reader, Writer¼°ÆäËùÓдøReader, WriterµÄ×ÓÀà
Îå¡¢°´ÊäÈëÊä³ö·Ö£º
1¡¢ÊäÈ룺Reader, InputStreamÀàÐ͵Ä×ÓÀà
2¡¢Êä³ö£ºWriter, OutputStreamÀàÐ͵Ä×ÓÀà
Áù¡¢ÌØÊâÐèÒª£º
1¡¢´ÓStreamµ½Reader,WriterµÄת»»ÀࣺInputStreamReader, OutputStreamWriter
2¡¢¶ÔÏóÊäÈëÊä³ö£ºObjectInputStream, ObjectOutputStream
3¡¢½ø³Ì¼äͨÐÅ£ºPipeInputStream, PipeOutputStream, PipeReader, PipeWriter
4¡¢ºÏ²¢ÊäÈ룺SequenceInputStream
5¡¢¸üÌØÊâµÄÐèÒª£ºPushbackInputStream, PushbackReader, LineNumberInputStream, LineNumberReader
¾ö¶¨Ê¹ÓÃÄĸöÀàÒÔ¼°ËüµÄ¹¹Ôì½ø³ÌµÄÒ»°ã×¼ÔòÈçÏ£¨²»¿¼ÂÇÌØÊâÐèÒª£©£º
µÚÒ»£¬¿¼ÂÇ×îÔʼµÄÊý¾Ý¸ñʽÊÇʲô£ºÊÇ·ñΪÎı¾£¿
µÚ¶þ£¬ÊÇÊäÈ뻹ÊÇÊä³ö?
µÚÈý£¬ÊÇ·ñÐèҪת»»Á÷£ºInputStreamReader, OutputStreamWriter?
µÚËÄ£¬Êý¾ÝÀ´Ô´£¨È¥Ïò£©ÊÇʲô£ºÎļþ£¿Äڴ棿ÍøÂ磿
µÚÎ壬ÊÇ·ñÒª»º³å£ºbufferedReader £¨Ìرð×¢Ã÷£ºÒ»¶¨Òª×¢ÒâµÄÊÇreadLine()ÊÇ·ñÓж¨Ò壬ÓÐʲô±Èread, write¸üÌØÊâµÄÊäÈë»òÊä³ö·½·¨£©
µÚÁù£¬ÊÇ·ñÒª¸ñʽ»¯Êä³ö£ºprint?
×ܽá¶þ£º
Ê×ÏÈÊÇjavaµÄIO¡£ÕâÆƶ«Î÷¿ÉÕæ·ÑÊ£¬I/OÀà¿â³£Ê¹ÓÔÁ÷(stream)”ÕâÖÖ³éÏó¡£Ëùν”Á÷”ÊÇÒ»ÖÖÄÜÉú³É»ò½ÓÊÜÊý¾ÝµÄ£¬´ú±íÊý¾ÝµÄÔ´ºÍÄ¿±êµÄ¶ÔÏó¡£Á÷°ÑI/OÉ豸ÄÚ²¿µÄ¾ßÌå²Ù×÷¸øÒþ²ØÆðÀ´ÁË¡£ ÕýÈçJDKÎĵµËùÏÔʾµÄ£¬JavaµÄI/OÀà¿â·Ö³ÉÊäÈëºÍÊä³öÁ½´ó²¿·Ö¡£ËùÓÐInputStreamºÍReaderµÄÅÉÉúÀ඼ÓÐÒ»¸ö»ù±¾µÄ£¬¼Ì³ÐÏÂÀ´µÄ£¬ÄܶÁÈ¡µ¥¸ö»òbyteÊý×éµÄread( )·½·¨¡£Í¬Àí£¬
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
JAVA³£ÓÃÀàµÄʹÓ÷½·¨
£±¡¢IntegerÀà
£²¡¢FloatÀà
£³¡¢DoubleÀà
£´¡¢CharacterÀà
£µ¡¢StringÀà
£¶¡¢StringTokenizerÀà
£·¡¢StringBufferÀà
£¸¡¢RandomÀà
1£®IntegerÀàµÄʹÓ÷½·¨
Interger£ºÕûÊýÀàÐÍ
£±¡¢ÊôÐÔ¡£
static int MAX_VALUE£º·µ»Ø×î´óµÄÕûÐÍÊý£»
static int MIN_VALUE£º·µ»Ø×îСµÄÕûÐÍÊý£»
static C ......
ѧϰjavaµÄ30¸öÄ¿±ê----Èç¹ûÕâ30ÌõÄã×öµÄ²î²»¶àÁË£¬jAVAˮƽ¾Íµ±È»²»ÓÃ˵ÁË£¬ºÃºÃŬÁ¦°É
1.ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÊ®·ÖÁ˽âUML£¬ÓÈÆäÊÇclass£¬object£¬interactionÒÔ¼°statediagrams¡£
¡¡¡¡2.ÄãÐèҪѧϰJAVAÓïÑԵĻù´¡ÖªÊ¶ÒÔ¼°ËüµÄºË ......
1.Ï̴߳´½¨µÄÁ½ÖÖ·½Ê½
1£©À©Õ¹ThreadÀಢÖØдpublic void run()·½·¨
ps£º
¶¨ÒåỊ̈߳º
class myThread extends Thread(){
public void run(){
System.out.println("Ju ......
Java¸ß¼¶££JavaÏß³ÌÔËÐÐÕ»ÐÅÏ¢µÄ»ñÈ¡
·¢²¼Ê±¼ä£º2007.11.14 05:10 À´Ô´£ºÈüµÏÍø¼¼ÊõÉçÇø ×÷Õߣºbaocl
Ò»¡¢ÎÊÌâµÄÒýÈë
ÎÒÃÇÔÚJava³ÌÐòÖÐʹÓÃÈÕÖ¾¹¦ÄÜ£¨JDK Log»òÕßLog4J£©µÄʱºò£¬»á·¢ÏÖLogϵͳ»á×Ô¶¯°ïÎÒÃÇ´òÓ¡³ö·á¸»µÄÐÅÏ¢£¬¸ñʽһ°ãÈçÏ£º
[ÔËÐÐʱ¼ä] [µ ......