ʹÓÃ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
Ïà¹ØÎĵµ£º
ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«ÊÇ£¬ÎÒÃǵ½µ×ÉùÃ÷ÁËʲô£¿»Ø´ðͨ³£ÊÇ£ºÒ»¸öString£¬ÄÚÈÝÊÇ“Hello world!”¡£ÕâÑùÄ£ºýµÄ»Ø´ðͨ³£ÊǸÅÄî²»ÇåµÄ¸ùÔ´¡£Èç¹ûҪ׼ȷµÄ»Ø´ð£¬Ò»°ëµÄÈË´ó¸Å»á»Ø´ð´íÎó¡£
Õâ
¸öÓï¾äÉùÃ÷µÄÊÇÒ»¸öÖ¸Ïò¶ÔÏóµÄÒýÓã¬ÃûΪ“s ......
1.ÈçºÎ»ñµÃÊý×éµÄ³¤¶È£¿
Êý×éÃû.length
2.·ÃÎÊÐÞÊηû“public/private/protected/ȱʡµÄÐÞÊηû”µÄʹÓÃÀà?
public : ¹«¹²,¾ù¿É·ÃÎÊ
private: ˽ÓеÄ,ͬһ¸öjavaÀàÖпÉÒÔ·ÃÎÊ.×ÓÀ಻ÄÜ·ÃÎÊ.
protected: ͬһ¸ö°üÖеÄÀà¶¼¿É·ÃÎÊ.×ÓÀà¿ÉÒÔ·ÃÎÊ.
ȱʡ,friendly :µ±Ç°Àà,ͬһ¸ö°ü,¶¼¿ÉÒÔ·ÃÎÊ.
×÷ÓÃÓò µ± ......
×òÌìÔÚдÍêjavaÏÂÔØµÄÎÄÕºó¾ÍÔÚ½ñÌì·¢ÏÖÁËÒ»¸öÎÊÌ⡣ͨ¹ýÕâ¸öÎÊÌâÒ²·´Ó¦³ö¶ÔHttpURLConnectionÕâ¸öÀ໹²»Á˽⡣³Ã´Ë»ú»áÔÙÌí¼ÓһЩ¶ÔÕâ¸öÀàµÄÁ˽â°É¡£Ê×ÏÈ¿´¿´Ç°ÃæÄǶϴúÂëÔÚÎҵijÌÐòÖгöÏÖÁËʲôÎÊÌ⣺
ÔÚÎҵijÌÐòÖ ......
Struts¡¢HibernateºÍSpringÊÇÎÒÃÇJava¿ª·¢Öеij£Óùؼü£¬ËûÃÇ·Ö±ðÕë¶Ô²»Í¬µÄÓ¦Óó¡¾°¸ø³ö×îºÏÊʵĽâ¾ö·½°¸¡£µ«ÄãÊÇ·ñÖªµÀ£¬ÕâЩ֪Ãû¿ò¼Ü×î³õÊÇÔõÑù²úÉúµÄ£¿
ÎÒÃÇÖªµÀ£¬´«Í³µÄJava WebÓ¦ÓóÌÐòÊDzÉÓÃJSP+Servlet+JavabeanÀ´ÊµÏֵģ¬ÕâÖÖģʽʵÏÖÁË×î»ù±¾µÄMVC·Ö²ã£¬Ê¹µÄ³ÌÐò½á¹¹·ÖΪ¼¸²ã£¬ÓиºÔðǰ̨չʾµÄJSP¡¢¸ºÔðÁ÷³Ì ......
ÔÚJDK6ÖÐ ,AWTÐÂÔö¼ÓÁËÁ½¸öÀà:DesktopºÍSystemTray,ǰÕß¿ÉÒÔÓÃÀ´´ò¿ªÏµÍ³Ä¬ÈÏä¯ÀÀÆ÷ä¯ÀÀÖ¸¶¨µÄURL,´ò¿ªÏµÍ³Ä¬ÈÏÓʼþ¿Í»§¶Ë¸øÖ¸¶¨µÄÓÊÏä·¢Óʼþ,ÓÃĬÈÏÓ¦ÓóÌÐò´ò¿ª»ò±à¼Îļþ(±ÈÈç,ÓüÇʱ¾´ò¿ªÒÔtxtΪºó׺ÃûµÄÎļþ),ÓÃϵͳĬÈϵĴòÓ¡»ú´òÓ¡Îĵµ;ºóÕß¿ÉÒÔÓÃÀ´ÔÚϵͳÍÐÅÌÇø´´½¨Ò»¸öÍÐÅ̳ÌÐò.ÏÂÃæ´úÂëÑÝʾÁËDeskt ......