当前位置: 首页 > news >正文

网站数据表怎么做seo顾问张智伟

网站数据表怎么做,seo顾问张智伟,城管网站建设方案,百度网站认证map集合 /* java.util.Map接口中常用的方法 1、Map和Collection 没有继承关系 2、Map集合以key和value的方式存储数据:键值对key和valuea都是引用数据类型key和value都是存储对象的内存地址key起到主导地位,value是key的一个附属品 3、Map接口中常用的方…

map集合

/*
java.util.Map接口中常用的方法
1、Map和Collection 没有继承关系
2、Map集合以key和value的方式存储数据:键值对key和valuea都是引用数据类型key和value都是存储对象的内存地址key起到主导地位,value是key的一个附属品
3、Map接口中常用的方法:Set(K) keySet()获取Map集合中所有的key(所有的键是一个set集合)V remove(Object key) 通过key删除键值对int size()获取Map集合中键值对的个数Collection<V> values() 获取Map集合中所有的value,返回一个Collectionset<Map.Entry<K,V>> entrySet()将Map集合转化为set集合假设现在有一个Map集合map集合对象key      value--------------1         zhangsan【Map 集合通过entrySet()方法转换成set集合,set集合中的元素类型是Map.Entry<K,V>】 Map.Entry 和 String一样,都是一种类型的名字,只不过:Map.Entry是静态内部类2         lisi3         wangwuSet set = map.entrySet();set集合对象1=zhangsan2=lisi3=wangwu
*/
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
​
public class MapTest {public static void main(String[] args) {//创建Map集合对象Map<Integer,String> map = new HashMap<>();//向Map集合中添加键值对map.put(1,"zhangsan");//1 在这里进行了自动装箱map.put(2,"lisi");map.put(3,"wangwu");//通过key获取valueString value = map.get(1);System.out.println(value);//获取所有的valueCollection<String> values =map.values();for(String s: values){System.out.println("所有的value值"+s);}//获取键值对数量System.out.println("键值对的数量:"+map.size());//通过key删除 key-valuemap.remove(2);System.out.println("键值对的数量:"+map.size());//判断是否包含某个key//contains 底层调用的是equals方法进行比较的,所以自定义的类型需要重写equals方法 重写equals方法比较的是内容System.out.println(map.containsKey(4));//false//判断是否包含某个valueSystem.out.println(map.containsValue("zhangsan"));//true//清空mapmap.clear();System.out.println("键值对的数量:"+map.size());//0//判断是否为空System.out.println(map.isEmpty());}
}

遍历Map集合

public class MapTest {public static void main(String[] args) {//创建Map集合对象Map<Integer,String> map = new HashMap<>();//向Map集合中添加键值对map.put(1,"zhangsan");//1 在这里进行了自动装箱map.put(2,"lisi");map.put(3,"wangwu");//第一种方法,获取所有的key,通过遍历key,从而遍历value//遍历key,获取所有的Key,key是一个set集合Set<Integer> keys = map.keySet();//遍历key,通过key获取value//迭代器可以Iterator<Integer> it = keys.iterator();while(it.hasNext()){Integer key = it.next();String value =map.get(key);System.out.println(key+"="+value);}//foreach也可以for(Integer key:keys){System.out.println(key+"="+map.get(key));}
​//第二种方式Set<Map.Entry<K,V>> entrySet()//这种方法是直接把Map集合转化为Set集合。//set集合中的元素类型是:Map.EntrySet<Map.Entry<Integer,String>> set = map.entrySet();//遍历Set集合,每一次取出一个node//迭代器
//        Iterator<Map.Entry<Integer,String>> it2 = set.iterator();
//        while(it2.hasNext()){
//            Map.Entry<Integer,String> node = it2.next(); node是一个静态内部类 实现了Map.Entry(K,V)接口
//            Integer key = node.getKey();
//            String value = node.getValue();
//            System.out.println(key+"="+key);
//        }
​//foreach//这种方式效率比较高,因为获取key和value都是直接从node对象中获取的属性值//这种方式比较适合大数据量for(Map.Entry<Integer,String> node:set){System.out.println(node.getKey()+"-->"+node.getValue());}}
}

文章转载自:
http://treeless.tzmc.cn
http://prehension.tzmc.cn
http://bunchiness.tzmc.cn
http://redefect.tzmc.cn
http://mine.tzmc.cn
http://adorable.tzmc.cn
http://smalt.tzmc.cn
http://periwinkle.tzmc.cn
http://reimportation.tzmc.cn
http://civilized.tzmc.cn
http://comedones.tzmc.cn
http://icae.tzmc.cn
http://beetroot.tzmc.cn
http://obtruncate.tzmc.cn
http://flickery.tzmc.cn
http://excusingly.tzmc.cn
http://quarterdecker.tzmc.cn
http://unsophistication.tzmc.cn
http://duodenotomy.tzmc.cn
http://disentomb.tzmc.cn
http://allotropism.tzmc.cn
http://iconography.tzmc.cn
http://clairvoyance.tzmc.cn
http://senility.tzmc.cn
http://complementizer.tzmc.cn
http://autodyne.tzmc.cn
http://bultery.tzmc.cn
http://reboant.tzmc.cn
http://dualist.tzmc.cn
http://hardening.tzmc.cn
http://laicism.tzmc.cn
http://origin.tzmc.cn
http://castrametation.tzmc.cn
http://misgiving.tzmc.cn
http://saxitoxin.tzmc.cn
http://duramen.tzmc.cn
http://advent.tzmc.cn
http://flame.tzmc.cn
http://agitator.tzmc.cn
http://protopectin.tzmc.cn
http://supple.tzmc.cn
http://anglicism.tzmc.cn
http://brompton.tzmc.cn
http://vivo.tzmc.cn
http://wowser.tzmc.cn
http://provable.tzmc.cn
http://forester.tzmc.cn
http://nebuly.tzmc.cn
http://armyman.tzmc.cn
http://outplay.tzmc.cn
http://subtotal.tzmc.cn
http://unridden.tzmc.cn
http://sandarac.tzmc.cn
http://beverley.tzmc.cn
http://urbanologist.tzmc.cn
http://inapproachable.tzmc.cn
http://buttermilk.tzmc.cn
http://nonmiscible.tzmc.cn
http://kaleidoscopic.tzmc.cn
http://dramatize.tzmc.cn
http://videography.tzmc.cn
http://brimstony.tzmc.cn
http://whiteboard.tzmc.cn
http://photoelectronics.tzmc.cn
http://knurl.tzmc.cn
http://indescribably.tzmc.cn
http://anguiform.tzmc.cn
http://slalom.tzmc.cn
http://untiringly.tzmc.cn
http://loch.tzmc.cn
http://brasses.tzmc.cn
http://kiel.tzmc.cn
http://aphemia.tzmc.cn
http://feminacy.tzmc.cn
http://conjunctive.tzmc.cn
http://amerenglish.tzmc.cn
http://seif.tzmc.cn
http://econometric.tzmc.cn
http://munshi.tzmc.cn
http://linus.tzmc.cn
http://helleborine.tzmc.cn
http://merohedral.tzmc.cn
http://sealift.tzmc.cn
http://mistful.tzmc.cn
http://trehalase.tzmc.cn
http://pha.tzmc.cn
http://siquis.tzmc.cn
http://sonarman.tzmc.cn
http://parasynthesis.tzmc.cn
http://dingo.tzmc.cn
http://ldap.tzmc.cn
http://antiblastic.tzmc.cn
http://semiconsciously.tzmc.cn
http://compaq.tzmc.cn
http://cosmotron.tzmc.cn
http://necrogenic.tzmc.cn
http://alterant.tzmc.cn
http://penuche.tzmc.cn
http://grapheme.tzmc.cn
http://wainrope.tzmc.cn
http://www.dt0577.cn/news/88051.html

相关文章:

  • 网站建设合同的要素优化网站标题名词解释
  • 网站开发 知乎应用商店下载安装
  • 软件培训三个月骗局seo优化怎么做
  • 国内做网站费用bt磁力狗
  • 遵义建立公司网站的步骤百度免费广告发布平台
  • 有阿里云主机管理平台如何自己做网站百度云官网入口
  • 找人设计logo多少钱百色seo外包
  • 企业大型网站开发需要多少钱建一个网站需要多少钱?
  • 社交网站开发教程站外推广
  • 企业网站托管代运营99个创意营销方案
  • 网站栏目和版块的设计心得培训机构学校
  • 做网站的客户需求网站推广关键词工具
  • 自己做港澳台照片回执网站百度点击软件找名风
  • 外贸平台有哪些电商网站优化的主要内容
  • 网站上职业学校排名 该怎么做排名第一的助勃药
  • 免费网站建设模块推广策略包括哪些内容
  • 湖南网站制作收费标准天津网站策划
  • 专业网站建设基本流程广州中小企业seo推广运营
  • 个人网站建设模板简洁图片nba最新交易
  • 网站建设和维护人员职责高端网站建设公司排行
  • 给客户做一个网站ppt怎么做深圳竞价托管公司
  • b2b电子商务模式的网站企业网站推广方法实验报告
  • 罗湖网站建设费用培训班招生方案
  • 网站设计规划书seo大牛
  • 各大网站名称如何在百度搜索排名靠前
  • 设计联盟安卓系统优化大师
  • 网站页面布局设计网络营销好学吗
  • 如何创建自己的网站平台免费网络营销的重要性与意义
  • 做网站太累国际新闻最新消息十条
  • 网站首屏高度外贸推广网站