JAVA ³£Óü¼ÇÉ
1.²ð·Ö×Ö·û´®
Óöµ½ÌØÊâ×Ö·û£¬±ÈÈ磺¶Ô‘$’·ûºÅ£¬¾ÍÓ¦¸ÃʹÓÑ\\$’£¬ºó×ܽá¿ÉÒÔ¼Ó¸ö·½À¨ºÅÈç "[.]"¡£
2.±éÀúHASHMAP
Iterator itr = map.keySet().itrator();
while(itr.hasNext())
{
Object temp1 = itr.next();
Object temp2 = tab.get(temp1);
}
3.ÈÕÀú²Ù×÷
Calendar c = Canlendar.getInstance();
c.get(c.YEAR);//»ñÈ¡Äê·Ý£¬ÆäËûͬÀí
c.add(c.MONTH,-1);//ÉϸöÔµÄÈÕÆÚ
4.Ëæ»úÊý
Random random = new Random();
int ran = random.nextInt(100);
×¢Ò⣺·¶Î§[0£¬100£©
5.¶ÁÈ¡ÅäÖÃÎļþ
¶ÔÓÚini Îļþ»òÕß propertiesÎļþ£¬ÆäʵֻҪÄÚÈÝÊÇ ds=dfjh»òÕß kd: ksadkfÕâÖÖ£¬¾Í¿ÉÒÔÓÃ
Properties pro = new Properties();
//pro.load (Main.class.getResourceAsStream("/test.properties"));»òÕß
//pro.load (new FileInputStream ("test.properties"));
pro.getProperty ("test")
6.±éÀúvector
Á½ÖÖ·½Ê½£º
// for (Enumeration e = v.elements ();e.hasMoreElements ();)
// {
// System.out.println (e.nextElement ().toString ());
// }
Iterator item = v.iterator ();
while(item.hasNext ())
{
System.out.println (item.next ().toString ());
}
7.JAVAÔÚWINDOWSϵ÷ÓÃÆäËû³ÌÐò
try
{
Process p = Runtime.getRuntime().exec("mspaint");
p.waitFor();
}catch ...
8.»ñÈ¡¼üÅÌÊäÈë
BufferedReader input = new BufferedReader(new InputStream(System.in));
String s = input.readLine();
9.×ÓÀàÎ޲ι¹Ôì»áÒþʽsuper()£¬Èô¸¸ÀàûÓÐÉùÃ÷Î޲ι¹Ô캯Êý£¬¶øÇÒÓк¬²ÎÊý¹¹Ô캯Êý£¬³ÌÐò±àÒ벻ͨ¹ý¡£
10.ÃüÁîÌáʾ·ûÏ£¬±àÒëjavaÎļþ ½¨ÒéʹÓÃ"javac -d . xxx.java" ÄÜ×Ô¶¯Éú³É³ÌÐòÖеİü¡£¶øÔËÐÐÖ»ÐèÒª"java packname.mainclass".
11.ʹ
Ïà¹ØÎĵµ£º
±¾ÈËÔÚ½Ó´¥¹ý³ÌÖÐÓÐÁ½¸öÌû×ÓдµÄ²»´í£¬ÔÚ´ËÕûÀíһϣº
1.ÐòÁл¯
:½«¶ÔÏóת»¯³ÉÁ÷µÄ¹ý³Ì³ÆΪÐòÁл¯
·´ÐòÁл¯
:½«Á÷ת»¯³É¶ÔÏóµÄ¹ý³Ì³Æ֮Ϊ·´ÐòÁл¯
2.¶ÔÏóÐòÁл¯(Serializable)ÊÇÖ¸½«¶ÔÏóת»»Îª×Ö½ÚÐòÁеĹý³Ì£¬¶ø·´ÐòÁл¯ÔòÊǸù¾Ý×Ö½ÚÐòÁлָ´¶ÔÏóµÄ¹ý³Ì¡£
ÉÏÃæÕâÁ½¸ö½âÊͶ¼Í¨Ë×Ò׶®¡£
ÐòÁл¯¾ ......
ÎÒÃÇÔÚjspÒ³ÃæÉϵÄjs½Å±¾ÖпÉÒÔµ÷ÑÐjava´úÂ룬±ÈÈ磬ÎÒÃÇÐèÒªÔÙjsÖÐÓÃalertº¯ÊýÏÔʾ·þÎñÆ÷¶Ë·¢Ë͹ýÀ´µÄij¸ö×Ö·û´®ÄÇôÎÒÃÇ¿ÉÒÔÕâÑù×ö
tomcat주
ÔÚ·þÎñÆ÷¶ËÎÒÃÇÓÐrequest.setAttribute("name","abc");
ÄÇôÎÒÒªÔÚÒ³ÃæÉÏÓÃalertÏÔʾµÄ»°£¬ÓÐÁ½ÖÖ·½Ê½£º
1¡¢Ê¹ÓÃEL±í´ïʽ
ÔÚEl±í´ïʽµÄÍâÃæÓÃÒýºÅ¼´¿É£º
<scri ......
ÔÚѧУ×ÔѧJava£¬ÓõÄÊÇ¡¶Java³ÌÐòÉè¼Æ——Ò»ÖÖ¿ìѧ¿ÆµÄ·½·¨¡·¡£¿´ÁËÒÔºó·¢ÏÖ£¬°¡£¬ÕæÊÇÒ»±¾ºÃÊé¡£ËüÕæÊÇ¿çѧ¿Æ°¡£¬Êýѧ£¬ÎïÀí£¬ÉúÎïÎÊÌⶼ¿ÉÒÔÓÃJava×÷Ϊ¹¤¾ßÀ´Ñо¿¡£³ýÁ˸÷ÖÖÊýѧÎÊÌ⣬±ÈÈçËã·¨£¬µÝ¹é£¬Ëü»¹Ñо¿ÁËÎïÀíÎÊÌâ¡£ËüÉæ¼°Á˸÷ÖÖÎÊÌ⣬Éø͸ÀíÂÛ£¬»ùÒò×éѧ£¬Mandelbort¼¯µÈ¡£×îÅ£µÄÊÇ£¬ËüÓÃÆõԼʽµÄÉè¼ ......