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

java¶Áдɾ.text,.xmlÎļþÄÚÈÝ

package fileIo;  
 
import  java.io.BufferedReader;  
import  java.io.BufferedWriter;  
import  java.io.File;  
import  java.io.FileReader;  
import  java.io.FileWriter;  
 
 public   class  ReadTextFile   {  
    public  BufferedReader bufread;  
    public  BufferedWriter bufwriter;  
   File writefile;  
   String filepath, filecontent, read;  
   String readStr  =   "" ;  
    // ´ÓÎı¾ÎļþÖжÁÈ¡ÄÚÈÝ   
     public  String readfile(String path)     
      {  
         try    {  
           filepath  =  path;  // µÃµ½Îı¾ÎļþµÄ·¾¶   
            File file  =   new  File(filepath);  
           FileReader fileread  =   new  FileReader(file);  
           bufread  =   new  BufferedReader(fileread);  
             while  ((read  =  bufread.readLine())  !=   null )   {  
               read  =  read + " \r\n " ;              
          


Ïà¹ØÎĵµ£º

JavaºÍC++λÔËËã¶Ô±È

ΪÁËʵÏÖÁ½¸öÊý×Ö½øÐн»»»£¬ÎÒÃÇͨ³£¿ÉÒÔÀûÓÃλÔËËãÀ´ÊµÏÖ
C++³ÌÐò     swap(int a  ,int b){a^=b^=a^=b;}
JAVA³ÌÐò    swap(int a, int b){  a^=b;b^=a;a^=b; }»òÕß{ b^=(a^=b) ; a^=b;}
Èç¹ûJAVAÓÃC++µÄʵÏÖ·½Ê½Ôò»áµÃµ½ bµÃµ½ÁËaµÄÖµ£¬µ«ÊÇaÏÖÔÚµÄֵȴ² ......

Java»ù´¡ÎÊÌ⣺java.lang.String

Ô­ÎÄ: http://forum.javaeye.com/viewtopic.php?t=17912§Ö÷µÄÎÊÌâÎʵĺ¬º¬ºýºý:flyjie¸ø³öÁ˷dz£ÏêϸµÄ½âÊÍ£¬²»¹ý¾ÍÊÇûÓнâÊÍStringʵÀý»¯µÄÌØÊâ·½ÃæÒÔ¼°Intern()·½·¨µÄº¬Òå----------------------------------------------------------------------------------------------------------------------------------------- ......

JavaÖ®´Ójar°üÖжÁÈ¡ÅäÖÃÎļþµÄÐÅÏ¢

Java¿ª·¢ÖУ¬×îÖյijÌÐò·¢²¼Ò»°ãÊÇÒª´ò³Éjar°üÐÎʽµÄ£¬¶øÓÐһЩÅäÖÃÎļþÊÇ·ÅÔÚjarÀïÃæµÄ£¬ÕâÑùÔÚ×öFileÐÎʽµÄ¶Áȡʱ£¬¾Í»á·¢ÏÖ¶Á²»µ½ÏàÓ¦µÄÎļþ¡£ÏÂÃæÌṩһÖÖ½â¾ö·½Ê½£ºString fileName = "/config/abcd.config";
InputStream in = getClass().getResourceAsStream(fileName);
BufferedReader br = null;
try{
br = n ......

Tomcat java ¶¨Ê±ÈÎÎñ

Á½¸ötomcat Java¶¨Ê±ÈÎÎñµÄÀý×Ó
ÀýÒ»£º
±¾ÀýÒÀ¾ÝJava×ÔÉíÌṩµÄ½Ó¿ÚʵÏÖ£¬Í¨¹ý¼àÌýÆ÷£¨Listener£©ºÍ¶¨Ê±Æ÷£¨Timer£©¶¨Ê±Ö´ÐÐij¸öÈÎÎñ£¨Task£©¡£
רҵµÄ¿ªÔ´¹¤¾ß¿É²Î¿¼Quartz£ºhttp://www.opensymphony.com/quartz/
MyListener£º
import
 java.util.Timer;
import
 javax.servlet.ServletContextEvent;
i ......

java»ñÈ¡µ±Ç°Ê±¼ä£¨×ªÔØ£©


ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆڵĸñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ