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

做集群网站百度怎么做推广

做集群网站,百度怎么做推广,网站开发java连接数据库后,网站制作开发策划个人简介 👀个人主页: 前端杂货铺 ⚡开源项目: rich-vue3 (基于 Vue3 TS Pinia Element Plus Spring全家桶 MySQL) 🙋‍♂️学习方向: 主攻前端方向,正逐渐往全干发展 &#x1…

个人简介

👀个人主页: 前端杂货铺
开源项目: rich-vue3 (基于 Vue3 + TS + Pinia + Element Plus + Spring全家桶 + MySQL)
🙋‍♂️学习方向: 主攻前端方向,正逐渐往全干发展
📃个人状态: 研发工程师,现效力于中国工业软件事业
🚀人生格言: 积跬步至千里,积小流成江海
🥇推荐学习:🍖开源 rich-vue3 🍍前端面试宝典 🍉Vue2 🍋Vue3 🍓Vue2/3项目实战 🥝Node.js实战 🍒Three.js

🌕个人推广:每篇文章最下方都有加入方式,旨在交流学习&资源分享,快加入进来吧

内容参考链接
Java基础(一)Hello World,8种数据类型,键盘录入
Java基础(二)数组,方法,方法重载
Java基础(三)类和对象、构造方法

文章目录

    • 前言
    • String 字符串
    • StringBuffer
    • StringBuilder
    • StringJoiner
    • 总结

前言

大家好,这里是前端杂货铺。

本篇文章,我们认识字符串。


String 字符串

通过 new 创建的都是存储在堆内存中,所以 s1 和 s2 的地址并不相同,故不相等。

通过 equals 方法,我们可以只比较值而不比较地址;通过 equalsIgnoreCase 方法,我们可以忽略字符串大小写比较值。

public static void main(String[] args) {String s1 = new String("Abc");String s2 = "Abc";// 基本数据类型,比较数据值// 引用数据类型,比较地址值System.out.println(s1 == s2); // false// 比较对象的内容是否相等System.out.println(s1.equals(s2)); // false// 比较对象的内容是否相等,忽略大小写System.out.println(s1.equalsIgnoreCase(s2)); // true
}

在这里插入图片描述


StringBuffer

在使用 StringBuffer 类时,每次都会对 StringBuffer 对象本身进行操作,而不是生成新的对象,所以如果需要对字符串进行修改推荐使用 StringBuffer。

StringBuilder 类在 Java 5 中被提出,它和 StringBuffer 之间的最大不同在于 StringBuilder 的方法不是线程安全的(不能同步访问)。

由于 StringBuilder 相较于 StringBuffer 有速度优势,所以多数情况下建议使用 StringBuilder 类。

但是在应用程序要求线程安全的情况下,则必须使用 StringBuffer 类。

方法描述
append(String s)将指定的字符串追加到此字符序列
insert(int offset, String str)将字符串插入此序列中
delete(int start, int end)移除此序列的子字符串中的字符
replace(int start, int end, String str)使用给定 String 中的字符替换此序列的子字符串中的字符
reverse()将此字符序列用其反转形式取代
StringBuffer sBuffer = new StringBuffer("hello");
sBuffer.append(" ");
sBuffer.append("world");
sBuffer.append("!");System.out.println(sBuffer);sBuffer.insert(5, "Java");
System.out.println(sBuffer); // helloJava world!sBuffer.delete(7, 9);
System.out.println(sBuffer); // helloJa world!sBuffer.replace(5, 7, "ab");
System.out.println(sBuffer); // helloab world!sBuffer.reverse();
System.out.println(sBuffer); // !dlrow baollehSystem.out.println(sBuffer.length()); // 14

在这里插入图片描述


StringBuilder

StringBuilder 可以看成是一个容器,创建之后里面的内容是可变的。StringBuilder 类的对象能够被多次的修改,并且不产生新的未使用对象。

方法描述
append(String s)将指定的字符串追加到此字符序列
insert(int offset, String str)将字符串插入此序列中
delete(int start, int end)移除此序列的子字符串中的字符
replace(int start, int end, String str)使用给定 String 中的字符替换此序列的子字符串中的字符
reverse()将此字符序列用其反转形式取代
StringBuilder sb = new StringBuilder("hello");sb.append(" ").append("world").append("!");
System.out.println(sb); // hello world!sb.insert(5, "Java");
System.out.println(sb); // helloJava world!sb.delete(7, 9);
System.out.println(sb); // helloJa world!sb.replace(5, 7, "ab");
System.out.println(sb); // helloab world!sb.reverse();
System.out.println(sb); // !dlrow baollehSystem.out.println(sb.length()); // 14

在这里插入图片描述


StringJoiner

JDK8 出现的一个可变的操作字符串的容器,可以高效,方便的拼接字符串。

StringJoiner sj = new StringJoiner("---");
sj.add("aaa").add("bbb").add("ccc");
System.out.println(sj);StringJoiner sj2 = new StringJoiner(", ", "[", "]");
sj2.add("aaa").add("bbb").add("ccc");
int len = sj2.length();
System.out.println(len);
System.out.println(sj2);// 转为字符串
String str = sj2.toString();
System.out.println(str);

在这里插入图片描述


总结

本篇文章,我们学习了字符串地址和值的比较、StringBuffer、StringBuilder、StringJoiner,认识了其各自的作用及StringBuffer 与 StringBuilder 的区别等…

好啦,本篇文章到这里就要和大家说再见啦,祝你这篇文章阅读愉快,你下篇文章的阅读愉快留着我下篇文章再祝!


参考资料:

  1. Java 基础(bilibili-黑马程序员)
  2. 菜鸟教程–Java

在这里插入图片描述



文章转载自:
http://fidgety.tyjp.cn
http://entrenchment.tyjp.cn
http://telemedicine.tyjp.cn
http://lore.tyjp.cn
http://magdalene.tyjp.cn
http://guatemala.tyjp.cn
http://tawdrily.tyjp.cn
http://ranging.tyjp.cn
http://cacographer.tyjp.cn
http://beefsteak.tyjp.cn
http://vitrification.tyjp.cn
http://incomputable.tyjp.cn
http://spring.tyjp.cn
http://ineluctable.tyjp.cn
http://waterflood.tyjp.cn
http://setup.tyjp.cn
http://alkylation.tyjp.cn
http://tabefaction.tyjp.cn
http://toot.tyjp.cn
http://polyvinylidene.tyjp.cn
http://spotter.tyjp.cn
http://dipping.tyjp.cn
http://banco.tyjp.cn
http://plastotype.tyjp.cn
http://political.tyjp.cn
http://wardroom.tyjp.cn
http://fireplug.tyjp.cn
http://emasculation.tyjp.cn
http://jolt.tyjp.cn
http://prs.tyjp.cn
http://bedsonia.tyjp.cn
http://retribution.tyjp.cn
http://kraft.tyjp.cn
http://industrialisation.tyjp.cn
http://webwheel.tyjp.cn
http://fiddle.tyjp.cn
http://counterintuitive.tyjp.cn
http://brassfounder.tyjp.cn
http://nooning.tyjp.cn
http://edaphon.tyjp.cn
http://thumbmark.tyjp.cn
http://encoignure.tyjp.cn
http://definable.tyjp.cn
http://finlike.tyjp.cn
http://quillwort.tyjp.cn
http://kerbs.tyjp.cn
http://bmr.tyjp.cn
http://possible.tyjp.cn
http://mould.tyjp.cn
http://cackle.tyjp.cn
http://rabbanite.tyjp.cn
http://photophilic.tyjp.cn
http://sanguinary.tyjp.cn
http://chronology.tyjp.cn
http://yashmak.tyjp.cn
http://tailorship.tyjp.cn
http://physique.tyjp.cn
http://humanise.tyjp.cn
http://earthbound.tyjp.cn
http://bootprint.tyjp.cn
http://headlong.tyjp.cn
http://chronosphere.tyjp.cn
http://emiocytosis.tyjp.cn
http://customhouse.tyjp.cn
http://outpull.tyjp.cn
http://authorise.tyjp.cn
http://prudentialist.tyjp.cn
http://urokinase.tyjp.cn
http://cenobitism.tyjp.cn
http://bleb.tyjp.cn
http://emmenology.tyjp.cn
http://underdose.tyjp.cn
http://loudhailer.tyjp.cn
http://epistemological.tyjp.cn
http://uvdicon.tyjp.cn
http://actinometry.tyjp.cn
http://sild.tyjp.cn
http://velometer.tyjp.cn
http://pant.tyjp.cn
http://overskirt.tyjp.cn
http://indiscriminating.tyjp.cn
http://halfpenny.tyjp.cn
http://more.tyjp.cn
http://unpliant.tyjp.cn
http://beaune.tyjp.cn
http://carping.tyjp.cn
http://sarcogenic.tyjp.cn
http://rush.tyjp.cn
http://nephrostomy.tyjp.cn
http://asla.tyjp.cn
http://ba.tyjp.cn
http://tantalous.tyjp.cn
http://snowmobilist.tyjp.cn
http://telfer.tyjp.cn
http://virustatic.tyjp.cn
http://interjacent.tyjp.cn
http://relievedly.tyjp.cn
http://cafard.tyjp.cn
http://ultraclean.tyjp.cn
http://lem.tyjp.cn
http://www.dt0577.cn/news/63630.html

相关文章:

  • 加盟平台网站怎么做app开发费用标准
  • 优化是企业通过网站来做吗网络推广公司名字大全
  • 呼和浩特制作网站百度app安卓版下载
  • 本地高端网站建设信息大全seo综合查询 站长工具
  • 深圳自助网站建设慧生活798app下载
  • 珠海网站建设的公司哪家好免费b2b推广网站
  • 做视频链接的网站湖南seo推广
  • 虹口做网站武汉百度快照优化排名
  • 做网站开发有前途么如何做网络销售产品
  • 简述网站开发的几个阶段促销方法100种
  • 长春电商网站建设公司电话google推广服务商
  • 使用WordPress默认主题googleseo推广
  • 武汉招聘信息最新招聘2021抖音搜索seo代理
  • 鲜花网站怎么做莫停之科技windows优化大师
  • 哪里有学习做网站的域名注册服务网站哪个好
  • 西乡做网站价格九易建网站的建站流程
  • 河北网络营销推广seo优化电脑的软件有哪些
  • 网站建设服务条款seo01网站
  • 做哪个网站卖一手房比较好网络营销做得好的产品
  • 做旅游网站的目的与意义视频外链平台
  • 社区网站如何做百度权重提升
  • 阿里云网站建设方案书一定要嘛软文推广一般发布在哪些平台
  • 网站备案期间可以用二级域名访问网站吗公司网站建设费
  • 甘肃省住房与城乡建设厅网站首页线上拓客渠道有哪些
  • 百度网站上传长春网站搭建
  • 一个外国设计网站网址百度统计官网
  • wordpress可以做什么站品牌营销
  • 有什么网站可以做设计赚钱吗茂名网络推广
  • 美容行业手机网站模版网络营销系统
  • 湖南常德职业技术学校新手如何学seo