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

java ·ÖÒ³

    ¹Ø¼ü×Ö: java·ÖÒ³´úÂëʵÀý
package com.hjf.web.view;
public class PageUtil ...{
    private int pageSize;//ÿҳÏÔʾµÄÌõÊý
    private int recordCount;//×ܹ²µÄÌõÊý
    private int currentPage;//µ±Ç°Ò³Ãæ
    public PageUtil(int pageSize, int recordCount, int currentPage) ...{
            this.pageSize = pageSize;
            this.recordCount = recordCount;
            setCurrentPage(currentPage);
        }
         //¹¹Ôì·½·¨
        public PageUtil(int pageSize, int recordCount) ...{
            this(pageSize, recordCount, 1);
        }
        //×ÜÒ³Êý
        public int getPageCount() ...{
            int size = recordCount/pageSize;//×ÜÌõÊý/ÿҳÏÔʾµÄÌõÊý=×ÜÒ³Êý
            int mod = recordCount % pageSize;//×îºóÒ»Ò³µÄÌõÊý
            if(mod != 0)
                size++;
            return recordCount == 0 ? 1 : size;
        }
        //°üº¬£¬ÆðʼË÷ÒýΪ0
        public int getfromIndex() ...{
            //System.out.println("from index:"+(currentPage-1) * pageSize)


Ïà¹ØÎĵµ£º

JavaÓëÉè¼ÆÄ£Ê½ £¨±Ê¼ÇÒ»£©

  ³õ¶ÁÕâ±¾Ê飬¸Ð¾õȷʵ²»´í£¬×÷ÕߺÜÓÐʵÁ¦¡£µÚÈýÕÂÌáµ½Èí¼þµÄ¿Éά»¤ÐԺͿɸ´ÓÃÐÔ£¬×÷ÕßÊǽèÖújavaÓïÑԵĻúÖÆ£¬À´½²½âÁËÃæÏò¶ÔÏóÉè¼ÆÄ£Ê½µÄÖØÒªÖªÊ¶¡£
  Ò»¸öÈí¼þËæ×ÅÐÔÄÜÒªÇóµÄ±ä»¯¶ø±äµÃ“¸¯ÀÔµÄÔ­ÒòÓÐ4¸ö£º¹ýÓÚ½©Ó²£¬¹ýÓÚ´àÈõ£¬¸´ÓÃÂʵͣ¬ð¤¶È¹ý¸ß¡£
 ½©Ó²£ºÈç¹ûÐèÒª¸øÒ»¸öϵͳÔö¼ÓÒ»¸ö¹¦Ä ......

java¼ÆËãÁ½¸öÊýÊÇ·ñÎó²îÔÚ°Ù·ÖÖ®¼¸

ÒÔÏÂÊǼÆËãÁ½¸öÊýÎó²îÊÇ·ñÔÚ10% £¬Èç¹ûÔÚ10%ÒÔÄÚÊÇÕý³££¬ÆäËûÊDz»Õý³££¬ÓýÏСµÄÊý*10%+ÓýÏСµÄÊý=ÓýÏСµÄÊý*1.1%
double costNum =2;//µç·Ñƽ¾ùÈÕµçÁ¿
double amountNum =3; //µçÁ¿Æ½¾ùÈÕµçÁ¿

if(amountNum ......

´«ÖDz¥¿ÍjavaÅàѵ¡ï¡ï¡ï¡ï¡ïѧϰÉú»îƪ ѧϰ¸ÐÊÜ

      À´±±¾©ÒѾ­Êǽü20ÌìÁË£¬Æð³õ¸Õµ½¶ÔÎҵĴò»÷ȷʵ²»Ð¡£¬ºÜÏë»Ø¼Ò µÄ¸Ð¾õ£¬µ«ÊÇÀ´µ½ÁË´«ÖÇ£¬À´µ½ÁËÕâÀÐÄÀï¸Ð¾õºÃ¶àÁË£¬ÈËÉúµØ²»Ê죬È˵ÄÐÄÀïÒ»°ã¶¼ÊǺܹ¶ÀµÄ£¬ÏëÔÚÐÄÀïÕÒ¸öÒÀ¿¿£¬ÕÒ¸öÅóÓÑÄÜÒ»Æð³öÈ¥Íæ£¬ÁÄÌ죬ѧϰ¡£À´µ½Á˱±¾©£¬ÊÇÒ»¸öȫеÄÉú»î·½Ê½£¬Ê²Ã´¶¼Òª¿¿×Ô¼ºÁË£¬³öÃÅÕæµÄºÜÄÑ£¬ÓÈ ......

´«ÖDz¥¿ÍjavaÅàѵ2010Äê4ÔÂ23ÈÕ(hibernate)ѧϰ

½ñÌìÌý¿Î²ÅÖªµÀ×Ô¼º×ÔѧµÄhibernate¿ÉÒÔËãµÃÉÏÊÇһ̣ºýÍ¿£¬ÒòΪ֮ǰ¿´HibernateµÄÊé¿´ÁË¿´¼¸±é¶¼Ã»Óи㶮£¬½ñÌìÌýÁËÒ»ÌìµÄ¿Î£¬ºÜ¶à¶«Î÷¾Í»íÈ»¿ªÀÊ£¬ËùÒÔԤϰҲÊǺÜÖØÒªµÄ£¬ÄÇÅÂÊÇûÓп´¶®£¬µ«ÖÁÉÙÒ²ÓÐÓ¡Ïó¡£ ½ñÌìÉϿεĽø³Ì±È½Ï¿ì£¬ÐìÅà³ÉÀÏʦ½²¿Î£¬ÎÒÖ»ÄÜÓá°Ç¿º·¡±Á½¸ö×ÖÀ´ÐÎÈÝ£¬ÉÏ¿Îʱ¾«Á¦³äÅæ£¬ÓïËٿ죨µ«ÌýµÃºÜÇåÎú£¬¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ