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

javaʵÏÖÑéÖ¤Âë

javaÑéÖ¤ÂëµÄʵÏÖ(Ò»)
ÊÕ²Ø



1.ImageServletÀàµÄʵÏÖ£º
package com.mobile.control;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ImageServlet extends HttpServlet {
       public void doGet(HttpServletRequest request,
HttpServletResponse response)
                     throws ServletException, IOException {
              this.doPost(request, response);
       }
       // Éú³ÉÊý×ÖºÍ×ÖĸµÄÑéÖ¤Âë
       public void doPost(HttpServletRequest request,
HttpServletResponse response)
                     throws ServletException, IOException {
              BufferedImage img = new BufferedImage(68, 22,
                            BufferedImage.TYPE_INT_RGB);
              // µÃµ½¸ÃͼƬµÄ»æͼ¶ÔÏó
              Graphics g = img.getGraphics();
              Random r = new Random();
&


Ïà¹ØÎĵµ£º

Java µ÷ÓÃEXE

ʹÓÃRuntime.getRuntime().exec()·½·¨¿ÉÒÔÔÚjava³ÌÐòÀïÔËÐÐÍⲿ³ÌÐò.  
  ¸Ã·½·¨ÓÐ6¸ö¿É·ÃÎÊ°æ±¾:  
  1.exec(String   command)  
  2.exec(String   command,   String   envp[],   File   dir)    
  3.exec(String   cmd, &n ......

JavaÊÖ²áÖÐjava.util.RandomµÄÃèÊö£¬Ëæ»úÊý²úÉúËã·¨


java.util
Àà Random
java.lang.Object

java.util.Random
ËùÓÐÒÑʵÏֵĽӿڣº

Serializable
Ö±½ÓÒÑÖª×ÓÀࣺ

SecureRandom
public class Random
extends Object
implements Serializable
´ËÀàµÄʵÀýÓÃÓÚÉú³ÉαËæ»úÊýÁ÷¡£´ËÀàʹÓà 48 λµÄÖÖ×Ó£¬Ê¹ÓÃÏßÐÔͬÓ๫ʽ¶ÔÆä½øÐÐÐ޸ģ¨Çë²ÎÔÄ Donald Knuth µÄ ......

java ²éѯ¿ÉÓÃÓòÃû

Õâ¶Îʱ¼äÔÚ×¢²áÓòÃû£¬ÔÛÆð²½Íí£¬ºÃÓõÄÓòÃû¶¼¸ø±ðÈË×¢²áÁË¡£
ÏëÕÒ¸öλÊýÉÙµÄ.comÓòÃû£¬¿ÉÊÇ·¢Ïִ󲿷ֶ¼×¢²áÁË£¬Ò²¾ÍÊÇ˵£¬ÎÒµã»÷µÄ¶à´Î²éѯ¶¼ÊÇÀË·Ñ¿¨Â·ÀÎҿɲ»Ïë¼õ·Ê£©
ÓÚÊÇ»¨Á˵ãʱ¼ä£¬ÓÃjavaдÁ˸ö¸ù¾ÝÖ¸¶¨Î»Êý²éѯËùÓпÉÓõÄ.comÓòÃûµÄС³ÌÐò¡£ÌṩԴÂëÏÂÔØ¡£
ÎÒÀûÓõÄÊÇwhoisÕâ¸öÓòÃû²éѯÍøվȡµÃÊý¾Ý£¬ÔÚ²âÊÔµ ......

Java Serialization transient

1. ʲôÊÇSerialization?
´®Ðл¯(Serialization)ÊǼÆËã»ú¿ÆѧÖеÄÒ»¸ö¸ÅÄËüÊÇÖ¸½«¶ÔÏó´æ´¢µ½½éÖÊ£¨ÈçÎļþ¡¢ÄÚÔÚ»º³åÇøµÈ£©ÖлòÊÇÒÔ¶þ½øÖÆ·½Ê½Í¨¹ýÍøÂç´«Êä¡£Ö®ºó ¿ÉÒÔͨ¹ý·´´®Ðл¯´ÓÕâЩÁ¬ÐøµÄλÊý¾ÝÖØй¹½¨Ò»¸öÓëԭʼ¶ÔÏó״̬ÏàͬµÄ¶ÔÏó£¬Òò´ËÔÚÌض¨Çé¿öÏÂÒ²¿ÉÒÔ˵Êǵõ½Ò»¸ö¸±±¾£¬µ«²¢²»ÊÇËùÓÐÇé¿ö¶¼ÕâÑù¡£
JavaÓÐS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ