Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 jdbc µ÷Óà oracle´æ´¢¹ý³Ì ·µ»ØÓαê

1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd  varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......

WindowsÏÂMemcached°²×°¼°Java¿Í»§¶Ëµ÷ÓÃ

WindowsϵÄMemcache°²×°£º
1. ÏÂÔØmemcacheµÄwindowsÎȶ¨°æ£¬½âѹ·Åij¸öÅÌÏÂÃæ£¬±ÈÈçÔÚc:\memcached
2. ÔÚÖÕ¶Ë£¨Ò²¼´cmdÃüÁî½çÃæ£©ÏÂÊäÈë ‘c:\memcached\memcached.exe -d install’ °²×°
3. ÔÙÊäÈ룺 ‘c:\memcached\memcached.exe -d start’ Æô¶¯¡£NOTE: ÒÔºómemcached½«×÷ΪwindowsµÄÒ»¸ö· ......

java³£¼ûÃæÊÔÌâ

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

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

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

JAVA³£ÓÃÀà½âÎö String

      ÒªÀí½â javaÖÐStringµÄÔË×÷·½Ê½£¬±ØÐëÃ÷È·Ò»µã£ºStringÊÇÒ»¸ö·Ç¿É±äÀࣨimmutable£©¡£Ê²Ã´ÊǷǿɱäÀàÄØ£¿¼òµ¥ËµÀ´£¬·Ç¿É±äÀàµÄʵÀýÊDz»Äܱ»Ð޸ĵģ¬Ã¿¸öʵÀýÖаüº¬µÄÐÅÏ¢¶¼±ØÐëÔÚ¸ÃʵÀý´´½¨µÄʱºò¾ÍÌṩ³öÀ´£¬²¢ÇÒÔÚ¶ÔÏóµÄÕû¸öÉú´æÖÜÆÚÄڹ̶¨²»±ä¡£javaΪʲôҪ°ÑStringÉè¼ÆÎª·Ç¿É±äÀàÄØ£¿Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ