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

ʹÓÃJavaµÈ±ÈÀýËõ·ÅͼÏñ

±¾ÎÄΪԭ´´£¬ÈçÐè×ªÔØ£¬Çë×¢Ã÷×÷Õߺͳö´¦£¬Ð»Ð»£¡
   
Ëõ·ÅͼÏñµÄ»ù±¾Ô­ÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»­²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»­²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓÃ
InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
    
public
 
static
 
void
 scaleImage(InputStream imgInputStream,
            OutputStream imgOutputStream, 
int
 scale)
    {
        
try
        {
            Image src 
=
 javax.imageio.ImageIO.read(imgInputStream);
            
int
 width 
=
 (
int
) (src.getWidth(
null

*
 scale 
/
 
100.0
);
            
int
 height 
=
 (
int
) (src.getHeight(
null

*
 scale 
/
 
100.0
);
            BufferedImage bufferedImage 
=
 
new
 BufferedImage(width, height,
                    BufferedImage.TYPE_INT_RGB);
             bufferedImage.getGraphics().drawImage(
                    src.getScaledInstance(width, height, Image.SCALE_SMOOTH),
                    
0

0

null
);
      &nb


Ïà¹ØÎĵµ£º

java »ù´¡ÖªÊ¶µã»ã×Ü

ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«ÊÇ£¬ÎÒÃǵ½µ×ÉùÃ÷ÁËʲô£¿»Ø´ðͨ³£ÊÇ£ºÒ»¸öString£¬ÄÚÈÝÊÇ“Hello world!”¡£ÕâÑùÄ£ºýµÄ»Ø´ðͨ³£ÊǸÅÄî²»ÇåµÄ¸ùÔ´¡£Èç¹ûҪ׼ȷµÄ»Ø´ð£¬Ò»°ëµÄÈË´ó¸Å»á»Ø´ð´íÎó¡£
Õâ
¸öÓï¾äÉùÃ÷µÄÊÇÒ»¸öÖ¸Ïò¶ÔÏóµÄÒýÓã¬ÃûΪ“s ......

java³£¼ûÃæÊÔÌâ

1.ÈçºÎ»ñµÃÊý×éµÄ³¤¶È£¿
Êý×éÃû.length
2.·ÃÎÊÐÞÊηû“public/private/protected/ȱʡµÄÐÞÊηû”µÄʹÓÃÀà?
public : ¹«¹²,¾ù¿É·ÃÎÊ
private: ˽ÓеÄ,ͬһ¸öjavaÀàÖпÉÒÔ·ÃÎÊ.×ÓÀ಻ÄÜ·ÃÎÊ.
protected: ͬһ¸ö°üÖеÄÀà¶¼¿É·ÃÎÊ.×ÓÀà¿ÉÒÔ·ÃÎÊ.
ȱʡ,friendly :µ±Ç°Àà,ͬһ¸ö°ü,¶¼¿ÉÒÔ·ÃÎÊ.
×÷ÓÃÓò µ± ......

java ÏÂÔØÎļþµÄ·½·¨(2)

         ×òÌìÔÚдÍêjavaÏÂÔØµÄÎÄÕºó¾ÍÔÚ½ñÌì·¢ÏÖÁËÒ»¸öÎÊÌ⡣ͨ¹ýÕâ¸öÎÊÌâÒ²·´Ó¦³ö¶ÔHttpURLConnectionÕâ¸öÀ໹²»Á˽⡣³Ã´Ë»ú»áÔÙÌí¼ÓһЩ¶ÔÕâ¸öÀàµÄÁ˽â°É¡£Ê×ÏÈ¿´¿´Ç°ÃæÄǶϴúÂëÔÚÎҵijÌÐòÖгöÏÖÁËʲôÎÊÌ⣺
         ÔÚÎҵijÌÐòÖ ......

Java֪ʶʰÒÅ£ºÈý´ó¿ò¼ÜµÄ¼¼ÊõÆðÔ´(zz)


Struts¡¢HibernateºÍSpringÊÇÎÒÃÇJava¿ª·¢Öеij£Óùؼü£¬ËûÃÇ·Ö±ðÕë¶Ô²»Í¬µÄÓ¦Óó¡¾°¸ø³ö×îºÏÊʵĽâ¾ö·½°¸¡£µ«ÄãÊÇ·ñÖªµÀ£¬ÕâЩ֪Ãû¿ò¼Ü×î³õÊÇÔõÑù²úÉúµÄ£¿
ÎÒÃÇÖªµÀ£¬´«Í³µÄJava WebÓ¦ÓóÌÐòÊDzÉÓÃJSP+Servlet+JavabeanÀ´ÊµÏֵģ¬ÕâÖÖģʽʵÏÖÁË×î»ù±¾µÄMVC·Ö²ã£¬Ê¹µÄ³ÌÐò½á¹¹·ÖΪ¼¸²ã£¬ÓиºÔðǰ̨չʾµÄJSP¡¢¸ºÔðÁ÷³Ì ......

¹ØÓÚJavaµÄÁ½¸öÀà DesktopºÍSystemTray

 
ÔÚJDK6ÖР,AWTÐÂÔö¼ÓÁËÁ½¸öÀà:DesktopºÍSystemTray,ǰÕß¿ÉÒÔÓÃÀ´´ò¿ªÏµÍ³Ä¬ÈÏä¯ÀÀÆ÷ä¯ÀÀÖ¸¶¨µÄURL,´ò¿ªÏµÍ³Ä¬ÈÏÓʼþ¿Í»§¶Ë¸øÖ¸¶¨µÄÓÊÏä·¢Óʼþ,ÓÃĬÈÏÓ¦ÓóÌÐò´ò¿ª»ò±à¼­Îļþ(±ÈÈç,ÓüÇʱ¾´ò¿ªÒÔtxtΪºó׺ÃûµÄÎļþ),ÓÃϵͳĬÈϵĴòÓ¡»ú´òÓ¡Îĵµ;ºóÕß¿ÉÒÔÓÃÀ´ÔÚϵͳÍÐÅÌÇø´´½¨Ò»¸öÍÐÅ̳ÌÐò.ÏÂÃæ´úÂëÑÝʾÁËDeskt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ