⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.java

📁 jsp+servlet网上购物,是一个实现mvc的网站
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.ebook.Util;import com.ebook.impl.NoteImpl;/** * * @author 隆科 */import com.ebook.Entity.*;import java.util.*;public class Test {    public static void main(String[]args)throws Exception    {      /*  NoteImpl ni=new NoteImpl(new JdbcCon().getCon());        List list=ni.getNote();        PageHoder ph=new PageHoder(list,4);        List pagelist=ph.getCurrentList(1);        int allpages=ph.getPageNumber(5);         System.out.println(allpages);        Iterator iter=pagelist.iterator();        while(iter.hasNext())        {            Note note=(Note)iter.next();            System.out.print(note.getContent());        }         */        cartItem oldItem=new cartItem();        oldItem.setBookid(1);        oldItem.setBookname("11");         cartItem newItem=new cartItem();        oldItem.setBookid(2);        oldItem.setBookname("22");        shopCart cart=new shopCart();        cart.addcartItem(oldItem);        cart.addcartItem(newItem);      //cart.removeItem(1);        cart.removeAll();        ArrayList list=cart.getCart();        Iterator iter=list.iterator();        while(iter.hasNext())        {            cartItem item=(cartItem)iter.next();            System.out.println(item.getBookid());        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -