1.22作业

第一题:

 ArrayList<Integer> arr1 = new ArrayList<Integer>();

        for (int i=1 ;i <=100; i++)
        {
            arr1.add(i);
        }
        arr1.remove(10);

        System.out.println("显示集合内容 "+ arr1);

第二题

List

ArrayList<String> arr2 = new ArrayList<String>();

        arr2.add("A");

        arr2.add("a");

        arr2.add("c");

        arr2.add("C");

        arr2.add("a");

        System.out.println("显示arr2集合内容 :"+ arr2);

Set

HashSet<String> hs = new HashSet<String>();

        hs.add("A");

        hs.add("a");

        hs.add("c");

        hs.add("C");

        hs.add("a");

        System.out.println("显示hs集合内容 :"+ hs);
TreeSet <String> ts = new TreeSet<String>();

                ts.add("A");

        ts.add("a");

        ts.add("c");

        ts.add("C");

        ts.add("a");

        System.out.println("显示ts集合内容 "+ ts);

第三题

Map<String, String> hm = new HashMap<String,String>();

        hm.put( "001", "天枢");

        hm.put("002", "天璇");

        hm.put("003", "天玑");

        hm.put("004", "天权");

        hm.put("005", "玉衡");

        hm.put("006", "开阳");

        hm.put("007", "瑶光");

        HashMap<String,String> emp = new HashMap<String,String>();

        emp.putAll(hm);

        emp.remove("005");

        System.out.println(hm);

        for (String key : emp.keySet())
        {
            System.out.println(key + " = " +emp.get(key));
        }

时间: 2024-08-24 14:51:38

1.22作业的相关文章

10.22作业

一采购管理 1 采购管理的主要过程 1 编制采购计划 2 编制询价计划 3 询价.招投标 4 供方选择 5 合同管理和收尾 2 工作说明书与范围说明书的区别 工作说明书是对项目所要提供的产品或服务的叙述性的描述:项目范围说明书则通过明确项目应该完成的工作而确定了项目的范围 3 招投标的程序 1 招标人采用公开招标方式的,应该发布招标公告:招标人采用邀请招标方式的,应当向三个以上具备承担招标项目的能力.资信良好的特定的法人或者其他组织发出投标邀请书 2 招标人根据招标项目的具体情况,可以组织潜在投

9.22作业2

#include<iostream> using namespace std; int main(){ int a=11,b=1,c; while(a>0,b<6){ c=a-2*b; cout<<c<<endl; b++; } return 0; } #include<iostream> using namespace std; int main(){ for (int a=1;a<=11;a++){ if(a%2==1) cout<

9.22作业1

#include<iostream> using namespace std; int main(){ int x=8999; int value=x*1000/1000; cout<<"value="<<value<<endl; return 0; } #include<iostream> using namespace std; int main(){ int x=8999; int value=x/1000*1000;

9.22作业

#include<iostream> using namespace std; int main() { int x=8999; int value=x*1000/1000; cout<<"value="<<value<<endl; return 0; } #include<iostream> using namespace std; int main() { int x=8999; int value=x/1000*1000

9.22作业3

第一个 #include<iostream> using namespace std; int main() { int a=3,b; b=a++; cout<<"a="<<a<<", b="<<b); return 0; } 第二个 #include<iostream> using namespace std; int main() { int a=3,b; b=++a; cout<&l

9.22作业5

#include<iostream> using namespace std; int main() { cout<<(6&3)<<endl; return 0; }

9..22作业4

#include<iostream> using namespace std; int main() { short int s=3; s+=4; cout<<"s="<<s<<endl; return 0; }  

9.22号作业

昨天老师布置了一个相对复杂一点的作业,对于我这种之前没学过的学生了来说做起来还是有些困难的. 作业的内容是: index.html页面登录页面:1.页面有背景图2.有一个登录表单(用户名,密码,登录按钮,注册按钮)3.点击登录按钮跳转到学生信息表页面4.点击注册按钮跳转的注册页面 (仿新浪邮箱注册页面,点击注册跳转到学生信息表页面) stuTable.html学生信息表页面:1.只有一个表格,标题是学生信息表 表头为:姓名.性别.年龄.生日.查看详情2.点击查看详情跳转到类似简历的页面的指定学生

操作系统学习基本概念汇总

操作系统又是一门计算机专业必学的专业课之中的一个.相同对于非常多考研统考的同学来说也是必考的课程.本篇帖子是我大学时期整理的操作系统的基本知识点.足以应付大学时代的期末考试. 1. 存储管理研究课题的四个方面: (1) 存储分配问题:重点是研究存储共享和各种分配算法 (2) 地址再定位问题:研究地址变换机构,以及动态和静态再定位方法 (3) 存储保护问题:研究保护各类程序.数据区的方法 (4) 存储扩充问题:研究虚拟存储区和调度算法 2. 程序中由符号名组成的空间称为名空间. 3. 相对地址也叫