Java Programming ¡¾replace tool¡¿
³£³£ÐèÒªµÝ¹éµÄÌæ»»ÎļþÄÚÈÝ£¬Èç×î½üÎÒÏëдÁ˸öjEdit²å¼þ£¬jEditÌṩÁËÒ»¸ö²å¼þÄ£°å£¬ÎÒֻҪȫ²¿Ì滻һϾͳÉÁËÎÒ×Ô¼ºµÄ¹¤³Ì¡£ÔÚlinuxÏ£¬ÕâºÃ°ì£¬shellÀ´¸ã¶¨£¬µ«ÔÚWindowsÏ»òÕß²»ÊìϤshell¾ÍµÃÏëµãÆäËû°ì·¨À´°ìÁË£¬EditPlus¿ÉÒÔ£¬UEÒ²¿ÉÒÔ£¬²»¹ý²»Ì«·½±ãµÄÊÇÎļþÃû²»ºÃÌæ»»£¬ÒÔǰ¸ø×Ô¼ºÐ´¹ýÒ»¸öС¹¤¾ßÀ´³ÉÅú¸ÄMP3µÄÃû×Ö£¬ºóÀ´·¢ÏÖÓô¦Âù´ó£¬½ñÌìÓÖÓÐÐÂÒªÇóÁË£¬ÎÒ¾ÍдÁËMiniToolÀ´Íê³ÉÕâÒ»MiniCase¡£Ã»Ð´UI£¬ÒòΪÎÒ×Ô¼ºµÄϵͳÊÇRHEL5£¬Ï²»¶ÃüÁîÐÐÀ´²Ù×÷¡£
Here is the running img by Hypersnap 5.
Here is the code. Just there are two Java files.
package com.jonsenelizee.replace;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Stack;
public class FormattingPrintWriter extends PrintWriter
{
private static final String NEWLINE = System.getProperty("line.separator", "\r\n");
// Standard tab settings
private static final int[] STD_TABS = { 9, 17, 25, 33, 41, 49, 57, 65, 73, 81 };
private boolean _autoFlush;
private int[] _tabs = STD_TABS;
@SuppressWarnings("unchecked")
private Stack _stack = new Stack();
private int _indent;
private int _pos;
/**
* Returns a string consisting of the specified number of spaces.
*
* @return The requested whitespace string.
*/
private static String spaces(int n)
{
char[] ca = new char[n];
for (int i = 0; i < n; i++)
ca[i] = ' ';
return new String(ca, 0, ca.length);
}
/**
* Constructs a new FormattingPrintWriter, without automatic line
* flushing.
*
* @param out
* A character-output stream.
*/
public FormattingPrintWriter(Writer out)
{
super(out);
}
/**
* Constructs a new FormattingPrintWriter.
*
* @param out
* A character-output stream.
* @param autoFlush
* If <code>true</code>, the println() methods will flush
* the output buffer.
*/
public Formattin
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
package game;
public class HanTa {
public static int i = 0;
public static void main(String[] args){
calc('A', 'B', 'C', 2);
System.out.println("×îÉÙÐèÒª"+i+"²½¡£");
}
//ººÂÞËþÓÎÏ·¼ÆËã
public static void calc(char src, char ilde, c ......
package game;
public class JieCeng {
public static void main(String[] args){
System.out.println(fun(10));
}
public static int fun(int n){
if(1==n)
return 1;
System.out.println( n * fun(n-1));
return ......
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁË
JavaÔËÐл·¾³£¨Java Runtime
Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕ
JDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣬»¹Óк ......