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

javaÈçºÎ´Ó¿ØÖÆ̨»ñµÃÒ»ÐÐÊäÈë

  /**
  *
  * @param par
  *            ÈëÁ¦Ãû
  * @return ÈëÁ¦値
  */
 public static String inputfromConsole(String par) {
  System.out.println(par);
  InputStreamReader in = null;
  BufferedReader br = null;
  in = new InputStreamReader(System.in);
  br = new BufferedReader(in);
  String str = "";
  try {
   str = br.readLine();
  } catch (IOException e) {
  }
  return str;
 }
²âÊÔº¯Êý
 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  System.out.println(Base.inputfromConsole("please input data"));
 }
²âÊÔ½á¹û
please input data
123456
123456


Ïà¹ØÎĵµ£º

Ó²»Ø³µ¡¢Èí»Ø³µ¡¢javaתÒå×Ö·û

 Èí»Ø³µ£¨Soft Return£©£ºÈí»Ø³µÊÇÔÚ×Ö´¦Àí³ÌÐòÖÐ×÷Ϊ×Ô¶¯ÒÆÐй¦ÄܵÄÒ»²¿·Ö×Ô¶¯²åÈëµÄ£¬Ò²½Ð»»Ðзû£¬ÔÚwordÖп´²»¼û¡£Èç¹ûÎı¾
Ò»Ðеij¤¶È³¬¹ýÎĵµËù¶¨ÒåµÄÓұ߾àʱ£¬¼´µ±Ç°ÐÐûÓÐ×ã¹»µÄ¿Õ¼ä·ÅÖÃÏÂÒ»¸ö×Ö·ûʱ£¬ÎÄ×Ö´¦ÀíÈí¼þ½«ÔÚÕâÒ»ÐÐÎı¾µÄĩβ×Ô¶¯²åÈëÒ»
¸öÈí»Ø³µ·û£¬Îı¾ÁíÆðÒ»ÐС£Õâ¸öÈí»Ø³µ·ûÊÇÓɱ༭³ÌÐò×Ô¶¯² ......

Java ÊäÈë/Êä³ö

 ÔÚjavaÓïÑÔÖУ¬I/OµÄ·½Ê½ÊÇÁ÷µÄ·½Ê½¡£Á÷£¨stream£©ÕâÊǸöѧϰjavaÊäÈëÊä³öµÄ×î»ù±¾µÄ¸ÅÄî¡£Á÷ÊÇ×Ö½Ú´ÓÔ´µ½Ä¿µÄµÄÓÐÐòÐòÁС£Ò»·½ÃæÊÇ×Ö½Ú£¬Ò»·½ÃæÊÇÓÐÐòµÄ¡£Á÷ÃèÊöµÄÊÇÒ»¸ö¹ý³Ì£¬Ë³ÐòÑϸñ¡£Ò»¸öÐèÒª¼üÅÌÊäÈëµÄ³ÌÐò¿ÉÒÔÓÃÁ÷À´×öµ½ÕâÒ»µã¡£Á½ÖÖ»ù±¾µÄÁ÷ÊÇ£ºÊäÈëÁ÷ºÍÊä³öÁ÷¡£Äã¿ÉÒÔ´ÓÊäÈëÁ÷¶Á£¬µ«Äã²»ÄܶÔËüд¡£Òª´ÓÊäÈëÁ ......

JavaÁ¬½Ó³ØµÄ»ù±¾¹¤×÷Ô­Àí

 ¡¡1¡¢»ù±¾¸ÅÄî¼°Ô­Àí
¡¡¡¡ÎÒÃÇÖªµÀ£¬¶ÔÓÚ¹²Ïí×ÊÔ´£¬ÓÐÒ»¸öºÜÖøÃûµÄÉè¼Æģʽ£º×ÊÔ´³Ø(Resource Pool)¡£¸ÃģʽÕýÊÇΪÁ˽â¾ö×ÊÔ´µÄƵ·±·ÖÅä?ÊÍ·ÅËùÔì³ÉµÄÎÊÌ⡣Ϊ½â¾öÉÏÊöÎÊÌ⣬¿ÉÒÔ²ÉÓÃÊý¾Ý¿âÁ¬½Ó³Ø¼¼Êõ¡£Êý¾Ý¿âÁ¬½Ó³ØµÄ»ù±¾Ë¼Ïë¾ÍÊÇΪÊý¾Ý¿âÁ¬½Ó½¨Á¢Ò»¸ö“»º³å³Ø”¡£Ô¤ÏÈÔÚ»º³å³ØÖзÅÈëÒ»¶¨ÊýÁ¿µÄÁ¬½Ó£¬µ±Ð ......

JavaʵÏÖĿ¼²éÕÒÓëÎı¾ÔĶÁ

 1.ʵÏÖÎı¾ÔĶÁ
package AllAboutFile;
/**
 *
 * @author lucifer
 */
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class FileViewer extends Frame implements ActionListener{
     String directory;
     Text ......

JavaÖÐʵÏÖ Client

1.Ïà¹ØÀàµÄ½éÉÜ
·þÎñÆ÷³ÌÐò²»Í¬ÓÚ¿Í»§»ú¶ËµÄ³ÌÐò£¬ËüÐèÒª³õʼ»¯Ò»¸ö¶Ë¿Ú½øÐмàÌý£¬Óöµ½Á¬½Óºô½Ð£¬²ÅÓëÏàÓ¦µÄ¿Í»§»ú½¨Á¢Á¬½Ó¡£Java.net°üµÄServerSocketÀà°üº¬Á˱àд·þÎñÆ÷ϵͳµÄÈ«²¿ËùÐ蹦ÄÜ£¬¶ø¿Í»§¶ËÈí¼þͨ³£Ê¹ÓÃjava.net°üÖеĺËÐÄÀàSocketÓë·þÎñÆ÷µÄij¸ö¶Ë¿Ú½¨Á¢Á¬½Ó¡£
2.µ¥Ï߳̿ͻ§¶Ë³ÌÐò½¨Á¢²½Ö裺
1£©½¨Á¢socket£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ