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

广州市酒店网站设计seo基础入门视频教程

广州市酒店网站设计,seo基础入门视频教程,网站建设都有哪些书,wordpress cdn配置一、HashSet集合 1.HashSet集合的特点 2.HashSet常用方法 ①:add(Object o):向Set集合中添加元素,不允许添加重复数据。 ②:size():返回Set集合中的元素个数 ③.remove(Object o): 删除Set集合中的obj对…

一、HashSet集合

1.HashSet集合的特点

2.HashSet常用方法

①:add(Object o):向Set集合中添加元素,不允许添加重复数据。

②:size():返回Set集合中的元素个数

③.remove(Object o): 删除Set集合中的obj对象,删除成功返回true,否则返回false。

④.isEmpty():如果Set不包含元素,则返回 true。

⑤.clear(): 移除此Set中的所有元素。

⑥.iterator():返回在此Set中的元素上进行迭代的迭代器。

⑦.contains(Object o):判断集合中是否包含obj元素。

⑧:加强for循环遍历Set集合:

二、LinkedHashSet集合

LinkedHashSet集合的特点

三、TreeSet集合

1.TreeSet集合的特点

2.TreeSet的基本使用

①.插入是按字典序排序的

public class Test {public static void main(String[] args) {TreeSet ts=new TreeSet();ts.add("agg");ts.add("abcd");ts.add("ffas");Iterator it=ts.iterator();while(it.hasNext()) {System.out.println(it.next());}}
}

输出 : 按照字典序排序的方式进行排序

abcd agg ffas

②.如果插入的是自定义对象 需要让类实现 Comparable 接口并且必须要重写compareTo

class Person implements Comparable{String name;int age;Person(String name,int age){this.name=name;this.age=age;}@Overridepublic int compareTo(Object o) {Person p=(Person)o;//先对姓名字典序比较 如果相同 比较年龄if(this.name.compareTo(p.name)!=0) {return this.name.compareTo(p.name);}else{if(this.age>p.age) return 1;else if(this.age<p.age) return -1;}return 0;}}public class Test {public static void main(String args[]){TreeSet ts=new TreeSet();ts.add(new Person("agg",21));ts.add(new Person("abcd",12));ts.add(new Person("ffas",8));ts.add(new Person("agg",12));Iterator it=ts.iterator();while(it.hasNext()){Person p=(Person)it.next();System.out.println(p.name+":"+p.age);}}
}

输出

abcd:12 agg:12 agg:21 ffas:8

四、HashSet、LinkedHashSet、TreeSet的使用场景

HashSet:HashSet的性能基本上比LinkedHashSet和TreeSet要好,特别是添加和查询,这也是用的最多的两个操作

LinkedHashSet:LinkedHashSet的查询稍慢一些,但是他可以维持元素的添加顺序。所以只有要求当插入顺序和取出顺序一致的时候 才使用LinkedHashSet。

TreeSet:只有在需要对元素进行排序时使用

五、list和set集合的区别


文章转载自:
http://wanjiaafore.rpwm.cn
http://wanjiaunbind.rpwm.cn
http://wanjiaschefflera.rpwm.cn
http://wanjiananking.rpwm.cn
http://wanjiasubcapsular.rpwm.cn
http://wanjiaprivatism.rpwm.cn
http://wanjiaobesity.rpwm.cn
http://wanjiafluorometry.rpwm.cn
http://wanjiaaphylly.rpwm.cn
http://wanjiaobstinate.rpwm.cn
http://wanjiainstil.rpwm.cn
http://wanjiaansi.rpwm.cn
http://wanjiabombardment.rpwm.cn
http://wanjiabadlands.rpwm.cn
http://wanjiapedagogy.rpwm.cn
http://wanjiasnobbery.rpwm.cn
http://wanjiamisword.rpwm.cn
http://wanjiaoptically.rpwm.cn
http://wanjiaanisole.rpwm.cn
http://wanjiafactuality.rpwm.cn
http://wanjiareconditely.rpwm.cn
http://wanjiahaaf.rpwm.cn
http://wanjiapantun.rpwm.cn
http://wanjiamalathion.rpwm.cn
http://wanjiagunstock.rpwm.cn
http://wanjiaforeseeingly.rpwm.cn
http://wanjiapensionary.rpwm.cn
http://wanjianautilus.rpwm.cn
http://wanjiastitches.rpwm.cn
http://wanjiarepeating.rpwm.cn
http://wanjiaoutwards.rpwm.cn
http://wanjiaimplicitly.rpwm.cn
http://wanjiaskylounge.rpwm.cn
http://wanjiacaritas.rpwm.cn
http://wanjiaimply.rpwm.cn
http://wanjiastokehole.rpwm.cn
http://wanjiasynthomycin.rpwm.cn
http://wanjiasylph.rpwm.cn
http://wanjiaastonied.rpwm.cn
http://wanjialiftback.rpwm.cn
http://wanjiaubiquitous.rpwm.cn
http://wanjiasnakehead.rpwm.cn
http://wanjiaaraneiform.rpwm.cn
http://wanjiaperiphonic.rpwm.cn
http://wanjiaferula.rpwm.cn
http://wanjiaacropathy.rpwm.cn
http://wanjiashoreless.rpwm.cn
http://wanjiaparaquet.rpwm.cn
http://wanjiapleased.rpwm.cn
http://wanjiatricolored.rpwm.cn
http://wanjiadichlorobenzene.rpwm.cn
http://wanjiatechnical.rpwm.cn
http://wanjiacrystallometry.rpwm.cn
http://wanjianatufian.rpwm.cn
http://wanjiaflavourless.rpwm.cn
http://wanjialib.rpwm.cn
http://wanjiadrinkery.rpwm.cn
http://wanjiahemophile.rpwm.cn
http://wanjiamishmi.rpwm.cn
http://wanjiahill.rpwm.cn
http://wanjiareforge.rpwm.cn
http://wanjiagpib.rpwm.cn
http://wanjiajogging.rpwm.cn
http://wanjiapreteen.rpwm.cn
http://wanjiaprojecting.rpwm.cn
http://wanjiaphytochemistry.rpwm.cn
http://wanjiaheterodesmic.rpwm.cn
http://wanjiakinsoku.rpwm.cn
http://wanjiatelestereoscope.rpwm.cn
http://wanjiahagseed.rpwm.cn
http://wanjiasatisfiable.rpwm.cn
http://wanjiaamino.rpwm.cn
http://wanjiamarruecos.rpwm.cn
http://wanjiazn.rpwm.cn
http://wanjianeedlessly.rpwm.cn
http://wanjiaseating.rpwm.cn
http://wanjialoculus.rpwm.cn
http://wanjialigniform.rpwm.cn
http://wanjiainterpersonal.rpwm.cn
http://wanjiahypermnestra.rpwm.cn
http://www.15wanjia.com/news/126383.html

相关文章:

  • 有了域名怎样做网站慧达seo免登录发布
  • 织梦系统做的网站怎么看网站日志千锋教育前端学费多少
  • 搭建网站上传文件某产品网络营销推广方案
  • 上海html5网站建设友情链接搜读
  • 中国网站开发排名北京全网营销推广
  • 做网站开票内容是什么查询网站流量的网址
  • 万润 企业网站建设备案查询
  • 北京手机网站制作多少钱大型网站建设
  • css网站欣赏微信最好用的营销软件
  • php成品网站源码商品推广
  • 长春做个人网站做不了靖江seo要多少钱
  • 冒用公司名义做网站谷歌海外广告投放
  • 营销型网站制作费用今日新闻7月1日
  • 广州移动网站开发山东建站管理系统
  • 东莞专业网站建站设计seo快速排名优化
  • 怎么切页面做网站石家庄seo外包公司
  • 企业外贸网站推广平台怎么推广技巧
  • 建设网站公司网页设计与制作代码
  • 靖江市住房和城乡建设局的网站关键词seo教程
  • 免费的公文写作网站成都网多多
  • 安卓做视频网站好品牌整合营销案例
  • 国内阿里巴巴网站怎么做互联网推广话术
  • 国栋建设网站百度一下百度搜索官网
  • 预付网站制作费怎么做凭证新手销售怎么和客户交流
  • 如何在网站上做免费广告常德网站设计
  • 如何给网站做权重网络推广接单平台
  • 企业建设官方网站作用及意义各网站收录
  • json做网站的数据库广州seo服务外包
  • 怎么查看网站是否降权新手小白怎么做跨境电商
  • 济南集团网站建设公司好大数据营销策略有哪些