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

java ÖÐµÄ for foreach whileÑ­»·µÄ±È½Ï

java for foreach whileÑ­»·µÄ±È½Ï
¹Ø¼ü×Ö: java
ÔÚjavaÖо¿¾¹ÊÇÒ»°ãµÄforÑ­»·£¬»¹ÊÇforµÄÔöÇ¿ÐÍforeach£¬»òÊÇwhileµÄÖ´ÐÐЧÂʱȽϿìÄØ,ÎÒÓÃÁËÒ»¸ö¼òµ¥µÄ³ÌÐòÀ´·ÖÎö3ÖÖÑ­»·
public static void main(String[] args) {
 
List<Integer> map = new ArrayList<Integer>();
for (int i = 0; i < 100000; i++) {
map.add(i);
}
 
 
long currTime = System.currentTimeMillis();
 
//»ù±¾µÄfor
int z = map.size();
// for (int i = 0; i < z; i++) {
// int tmp = map.get(i);
// System.out.println(tmp);
// }
//foreach
// for (Integer integer : map) {
// int tmp = integer;
// System.out.println(tmp);
// }
//while
// int i = 0 ;
// while(i<z){
// int tmp = map.get(i);
// System.out.println(tmp);
// i++;
// }
//
// long time = System.currentTimeMillis() - currTime ;
// System.out.println(time);
//
// }
ÏÂÃæÊÇ3ÖÖÑ­»·µÃ³öµÄÊý¾Ý(ʱ¼äµ¥Î»ÎªºÁÃë)
      for                   foreach                    while      
µÚÒ»×é±È½Ï(4´Î)
      1313                  1329                       1219
      1266                  1063                       1156
      1078                  1109        


Ïà¹ØÎĵµ£º

OpenJWeb Java¼¼ÊõÃÅ»§ÍøÔËÓª¹«¸æ

OpenJWeb Java¼¼ÊõÃÅ»§ÍøµØַΪhttp://www.openjweb.com:8088/crm ,´ËÍøÕ¾ÓÚ2010Äê2ÔÂ16ÈÕÕýʽÆôÓá£
OpenJWeb Java¼¼ÊõÃÅ»§ÍøÖ÷ÒªÌṩJava¼Ü¹¹Ñ§Ï°¡¢Java¿ªÔ´¿ò¼Ü¼¼Êõ½»Á÷¡¢OpenJWeb¼¼Êõ×ÊÁÏÏÂÔØ¡¢Ãâ·Ñ»áÔ±×¢²á¡¢openjweb.comÃâ·ÑÓÊÏä·þÎñ¡¢ÓʼþȺ·¢¡¢¿Í»§µµ°¸¹ÜÀí¡¢ÄÚÈݹÜÀíϵͳµÈ¹¦ÄÜ¡£
OpenJWeb Java¼¼ÊõÃÅ»§Íøµ ......

Java Web µÚ¶þÌì Servlet»ù´¡

Ò»¡¢
ʲôÊÇ
Servlet
Servlet
ÔÚ
web
ÈÝÆ÷ÖÐÓÃÀ´´´½¨¶¯Ì¬ÍøÒ³Óõģ¬ÒòΪËûûÓÐ
main
·½·¨£¬ËùÒÔ
Servlet
²»ÊÇÒ»¸öÍêÕûµÄ
Java
Ó¦ÓóÌÐò¡£
¶þ¡¢
Servlet
µÄ±àд
×î»ù±¾µÄ
Servlet
Òª°üÀ¨Èý²¿·Ö£¬·Ö±ðΪ
Servlet-name
¡¢
Servlet-class
¡¢
url-pattern
¡£
Èý¡¢
Servlet API
Generi
Servlet
ÊµÏ ......

Java Web µÚËÄÌì ʹÓÃServlet´¦ÀíÇëÇó

Ò»¡¢
GET
ºÍ
POST
µÄÇø±ð
1.GET
Ìá½»µÄÊÇÎı¾ÄÚÈÝ£¬¹æ¶¨ÆäÊý¾Ý³¤¶È²»³¬¹ý
255
¸ö×Ö·û¡£ÔÚ
GET
·½Ê½Ìá½»µÄ
URL
ÖлáÏÔʾ³öÌá½»µÄ²éѯÊý¾Ý¶øÈ´Ìá½»Êý¾ÝµÄ»º´æ»áÔÚä¯ÀÀÆ÷µÄ
URL
Àúʷ״̬ÖУ¬ÕâÑùÎÒÃÇÍùÍùÔÚä¯ÀÀÍøÒ³µÄʱºòµã»÷ºóÍ˼ü²»ÐèÒªÖØз¢ËÍÇëÇó¡£
2.POST
Ìá½»µÄ¿ÉÒÔʹÎı¾ÄÚÈÝ£¬Ò²¿ÉÒÔʹ¶þ½øÖÆÄÚÈÝ£¬Ëù ......

Java Web µÚ10Ìì ELºÍJSTL 2

ËÄ¡¢JSTLµÄÓ÷¨
ÔÚƽ³£µÄʹÓÃÖÐÎÒÃÇÒ»°ãÀûÓÃ
EL
¿ØÖƱäÁ¿ÒÔ¼°±äÁ¿µÄÊä³ö£¬ÀûÓÃ
JSTL
¿ØÖÆËãÊõÂß¼­¡£
JSTL
ÊÇÒ»ÖÖ±ê¼Ç¡£
1.      

JSTL
µÄµ¼Èë
                    &nb ......

¼¸¸öÖØÒªµÄJAVAÃüÁîÏê½â£¨×ªÔØ£©


javac
 
Ó÷¨£ºjavac <Ñ¡Ïî> <Ô´Îļþ>
ÆäÖУ¬¿ÉÄܵÄÑ¡Ïî°üÀ¨£º
  -g                                    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ