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

javaÎļþ¶Áд

Java ¶ÔÎļþ½øÐжÁд²Ù×÷µÄÀý×Ӻܶ࣬ÈóõѧÕ߸е½Ê®·ÖÀ§»ó£¬ÎÒ¾õµÃÓбØÒª½«¸÷ÖÖ·½·¨½øÐÐ
Ò»´Î·ÖÎö£¬¹éÀ࣬ÀíÇ岻ͬ·½·¨Ö®¼äµÄÒìͬµã¡£
Ò»£®ÔÚ JDK 1.0 ÖУ¬Í¨³£ÊÇÓà InputStream & OutputStream ÕâÁ½¸ö»ùÀàÀ´½øÐжÁд²Ù×÷µÄ¡£
InputStream ÖÐµÄ FileInputStream ÀàËÆÒ»¸öÎļþ¾ä±ú£¬Í¨¹ýËüÀ´¶ÔÎļþ½øÐвÙ×÷£¬ÀàËƵģ¬ÔÚ
OutputStream ÖÐÎÒÃÇÓÐ FileOutputStream Õâ¸ö¶ÔÏó¡£
ÓÃFileInputStream À´¶ÁÈ¡Êý¾ÝµÄ³£Ó÷½·¨ÊÇ£º
FileInputStream fstream = new FileInputStream(args[0]);
DataInputStream in = new DataInputStream(fstream);
Óà in.readLine() À´µÃµ½Êý¾Ý£¬È»ºóÓà in.close() ¹Ø±ÕÊäÈëÁ÷¡£
ÍêÕû´úÂë¼û Example 1¡£
ÓÃFileOutputStream À´Ð´ÈëÊý¾ÝµÄ³£Ó÷½·¨ÊÇ£º
FileOutputStream out out = new FileOutputStream("myfile.txt");   
PrintStream p = new PrintStream( out );
Óà p.println() À´Ð´ÈëÊý¾Ý£¬È»ºóÓà p.close() ¹Ø±ÕÊäÈë¡£
ÍêÕû´úÂë¼û Example 2¡£
¶þÔÚ JDK 1.1ÖУ¬Ö§³ÖÁ½¸öеĶÔÏó Reader & Writer, ËüÃÇÖ»ÄÜÓÃÀ´¶ÔÎı¾Îļþ½øÐвÙ×÷£¬¶ø
JDK1.1ÖÐµÄ InputStream & OutputStream ¿ÉÒÔ¶ÔÎı¾Îļþ»ò¶þ½øÖÆÎļþ½øÐвÙ×÷¡£
ÓÃFileReader À´¶ÁÈ¡ÎļþµÄ³£Ó÷½·¨ÊÇ£º
FileReader fr = new FileReader("mydata.txt");
BufferedReader br = new BufferedReader(fr);
Óà br.readLing() À´¶Á³öÊý¾Ý£¬È»ºóÓÃbr.close() ¹Ø±Õ»º´æ£¬ÓÃfr.close() ¹Ø±ÕÎļþ¡£
ÍêÕû´úÂë¼û Example 3¡£
Óà FileWriter À´Ð´ÈëÎļþµÄ³£Ó÷½·¨ÊÇ£º
FileWriter fw = new FileWriter("mydata.txt");
PrintWriter out = new PrintWriter(fw); 
ÔÚÓÃout.print »ò out.println À´ÍùÎļþÖÐдÈëÊý¾Ý£¬out.print ºÍ out.printlnµÄΨһÇø±ðÊǺóÕßд
ÈëÊý¾Ý»ò»á×Ô¶¯¿ªÒ»ÐÂÐС£Ð´ÍêºóÒª¼ÇµÃ ÓÃout.close() ¹Ø±ÕÊä³ö£¬ÓÃfw.close() ¹Ø±ÕÎļþ¡£  
ÍêÕû´úÂë¼û Example 4¡£
Example 1
Java´úÂë
// FileInputDemo   
// Demonstrates FileInputStream and DataInputStream   
import java.io.*;   
  
class FileInputDemo {   
  public static void main(String args[]) {   
    // args.length


Ïà¹ØÎĵµ£º

Flex+JavaÁ¬½ÓSQLServerÊý¾Ý¿â

 Ê×ÏÈ£¬×öÒ»µã˵Ã÷¡£FlexÊDz»ÄÜÖ±½ÓÁ¬½ÓÊý¾Ý¿âµÄ£¬ÕâÒ»µã´ó¼ÒÐèÒªÖªµÀ£¬ËüÖ»Äܼä½ÓµØÁ¬½ÓÊý¾Ý¿â¡£FlexÖÐÌṩÁËÈýÖÖ·½Ê½£ºHttpService£¬WebService ºÍRemoteObject¡£ÆäÖÐHttpService¿ÉÒÔÖ±½Ó»ñÈ¡XMLÖеÄÊý¾Ý£¬»¹¿ÉÒÔͨ¹ýJSP,ASPÒÔ¼°PHP¶ÁÈ¡Êý¾Ý¿âÖеÄÊý¾Ý£¬Õâ¸ö±È½Ï¼òµ¥£¬¶øÇÒÍøÉÏÒ²ÓкܶàÀý×Ó£¬ÎҾͲ»¶à˵ÁË¡£WebServi ......

Javaѧϰ´ÓÈëÃŵ½¾«Í¨

Javaѧϰ´ÓÈëÃŵ½¾«Í¨
ѧϰǰÁ˽â
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣠......

Javaµ÷ÓÃOracleÊý¾Ý¿âµÄ·ÖÒ³´æ´¢¹ý³Ì

 ×î½üÏîÄ¿½ø¶È±È½Ï»ºÂý£¬³õ²½Ñо¿ÁËÒ»ÏÂOracleµÄ´æ´¢¹ý³Ì£¬½«´úÂëÌù³öÀ´¡£
 Ê×ÏÈÏÈÌù³öÀ´OracleµÄ·ÖÒ³·ÖÒ³´æ´¢¹ý³Ì´úÂë°É¡£
 1.ÕâÊÇ°üµÄ´úÂë
 create or replace package DB_Oper is
  -- Author  : LIUBING
  -- Created : 2009-10-28 15:01:30
  -- Purpose : ²âÊÔOracleµ ......

javaËæ»úÊýµÄ²úÉú

1. import java.util.*; 
2.(A) public class Test
       { public static void main(String[] args)
         { 
         //Éú³É [0-n) ¸ö²»Öظ´µÄËæ»úÊý  st ÓÃÀ´±£´æ ......

java JNI ³¢ÊÔ

 ¡¡¡¡Ê×ÏÈÒýÓÃһƪÎÄÕ£¬½éÉÜÒ»¸ö¼òµ¥µÄJNIµÄµ÷ÓõĹý³Ì¡£¡¡¡¡JAVAÒÔÆä¿çƽ̨µÄÌØÐÔÉîÊÜÈËÃÇϲ°®£¬¶øÓÖÕýÓÉÓÚËüµÄ¿çƽ̨µÄÄ¿µÄ£¬Ê¹µÃËüºÍ±¾µØ»úÆ÷µÄ¸÷ÖÖÄÚ²¿ÁªÏµ±äµÃºÜÉÙ£¬Ô¼ÊøÁËËüµÄ¹¦ÄÜ¡£½â¾öJAVA¶Ô±¾µØ²Ù×÷µÄÒ»ÖÖ·½·¨¾ÍÊÇJNI¡£¡¡¡¡JAVAͨ¹ýJNIµ÷Óñ¾µØ·½·¨£¬¶ø±¾µØ·½·¨ÊÇÒÔ¿âÎļþµÄÐÎʽ´æ·ÅµÄ£¨ÔÚWINDOWSƽ̨ÉÏÊÇDL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ