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

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

±¾ÎÄת×Ôhttp://blog.csdn.net/nokiaguy/archive/2010/04/16/5493817.aspx
Ëõ·ÅͼÏñµÄ»ù±¾Ô­ÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»­²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»­²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓÃ
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
);
      &


Ïà¹ØÎĵµ£º

Thinking in java Ö®¸´ÓÃÀà final¹Ø¼ü×Ö

      ÏÖÔÚÎҾ͸ø´ó¼Ò½éÉÜÒ»ÏÂfinal¹Ø¼ü×ÖÏà¹ØµÄһЩ¶«Î÷~~~
     1£¬finalÊý¾Ý
          ÔÚJavaÖУ¬Ïò±àÒëÆ÷¸æÖªÒ»¿éÊý¾ÝÊǺ㶨²»±äµÄ£¬ÕâÀà³£Á¿±ØÐëÊÇ»ù±¾Êý¾ÝÀàÐÍ£¬²¢ÇÒÒԹؼü×Öfinal±íʾ£¬ÔÚ¶ÔÕâ¸ö³£Á¿½øÐж¨ÒåµÄʱºò£¬ ......

JavaÐòÁл¯¼òÃ÷¸ÅÒª

1. ¸ÅÄ ÐòÁл¯¾ÍÊǰѶÔÏó±ä³É¶ÔÏóÁ÷£¨È·ÇÐ˵ÊǰѶÔÏóµÄÊôÐÔдÈëÁ÷£©£¬Èç¹ûÐèÒª½ø¶ø¿ÉÒ԰ѶÔÏóÁ÷´æ³É¶þ½øÖÆÎļþ£»
2. Ä¿µÄ£º ÐòÁл¯µÄÄ¿µÄÊÇΪÁË·½±ãÓÀ¾Ã´æ´¢»òÕßÍøÂç´«Ê䣻
3. ÈçºÎʵÏÖ£º ½«ÀàʵÏÖSerializable½Ó¿Ú¼´¿É£¬ÎÞ±ØÐëʵÏֵķ½·¨£¬ÊµÏָýӿÚÖ»ÊÇΪÁ˱êʶ¸ÃÀà¿É±»ÐòÁл¯£»
4. £¨×ª£©ÆäËûÐèÒªÖªµÀµÄ£º
  ......

·¢ÏÖÒ»¸öc++¶à̬Óëjava¶à̬²»Í¬µÄµØ·½

¸Õ¸Õ¿´µ½Ò»ÆªÎÄÕÂÌá³öc++¶à̬Óëjava¶à̬²»Í¬µÄµØ·½£¬»ù±¾Òâ˼ÈçÏ£º
Çë¿´C++´úÂ룺
class Base
{
public:
 Base()
 {
  init(); 
 }
 virtual ~Base() {}
protected:
 int value;
 virtual void init() 
 { 
  value = 100; &nb ......

Java¸ß¼¶ÌØÐÔ 1

1.¾²Ì¬µ¼È룺
¾²Ì¬µ¼ÈëÊÇJDK1.5ºóмӵŦÄÜ£¬Ò»°ã²»Ôõô³£Ó㬺ܼòµ¥¸øÄã¾Ù¸öÀý×ÓÄã¾ÍÄÜÃ÷°×ÁË£¬¿´Õâ¶Î´úÂ룺
import static java.lang.System.out;//µ¼Èëjava.lang°üϵÄSystemÀàµÄ¾²Ì¬·½·¨out;
public class HelloWorld{
public static void main(String[] args){
out.print("Hello World!");//¼ÈÊÇÔÚÕ ......

JNI¼¼ÊõʵÏÖJAVA³ÌÐòµ÷ÓÃdll


JAVAµÄ¿çƽ̨µÄÌØÐÔÉîÊÜjava³ÌÐòÔ±ÃǵÄϲ°®,µ«ÕýÊÇÓÉÓÚËüΪÁËʵÏÖ¿çƽ̨µÄÄ¿µÄ,ʹµÃËüºÍ±¾µØ»úÆ÷µÄ¸÷ÖÖÄÚ²¿ÁªÏµ±äµÃºÜÉÙ,´ó´óÔ¼ÊøÁËËüµÄ¹¦ÄÜ,±ÈÈçÓëһЩӲ¼þÉ豸ͨÐÅ,ÍùÍùÒª»¨·ÑºÜ´óµÄ¾«Á¦È¥Éè¼ÆÁ÷³Ì±àд´úÂëÈ¥¹ÜÀíÉ豸¶Ë¿Ú,¶øÇÒÓÐһЩÉ豸³§ÉÌÌṩµÄÓ²¼þ½Ó¿ÚÒѾ­¾­¹ýÒ»¶¨µÄ·â×°ºÍ´¦Àí,²»ÄÜÖ±½ÓʹÓÃjava³ÌÐòͨ¹ý¶Ë¿ÚºÍÉè± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ