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

做网站的去哪找私活可以打广告的平台

做网站的去哪找私活,可以打广告的平台,网站seo优化总结,新手学做网站相关书籍🍬 博主介绍👨‍🎓 博主介绍:大家好,我是 hacker-routing ,很高兴认识大家~ ✨主攻领域:【渗透领域】【应急响应】 【Java】 【VulnHub靶场复现】【面试分析】 🎉点赞➕评论➕收藏 …
🍬 博主介绍👨‍🎓 博主介绍:大家好,我是 hacker-routing ,很高兴认识大家~
✨主攻领域:【渗透领域】【应急响应】 【Java】 【VulnHub靶场复现】【面试分析】
🎉点赞➕评论➕收藏 == 养成习惯(一键三连)😋
🎉欢迎关注💗一起学习👍一起讨论⭐️一起进步📝文末有彩蛋
🙏作者水平有限,欢迎各位大佬指点,相互学习进步!

目录

获取Integer对象的方式

在以前包装类如何进行计算

总结:

Integer 成员方法

使用字符串进行进制转换

键盘录入,使用nextLine


获取Integer对象的方式

public class demon1 {public static void main(String[] args) {/*public Integer(int value) 根据传递的整数创建一个Integer对象public Integer(String s) 根据传递的字符串创建一个Integer对象public static Integer valueOf(int i) 根据传递的整数创建一个Integer对象public static Integer valueof(String s) 根据传递的字符串创建一个Integer对象public static Integer valueof(String s, int radix) 根据传递的字符串和进制创建一个Integer对象*///1、利用构造方法获取intege的对象(jdk5以前)Integer i1 = new Integer(1);Integer i2 = new Integer("2");System.out.println(i1);System.out.println(i2);//2、利用静态方法获取integer的对象(jdk5以前)Integer i3 = new Integer(123);Integer i4 = new Integer("123");Integer i5 = Integer.valueOf("123",8);System.out.println(i3);System.out.println(i4);System.out.println(i5);//3.这两种方式获取对象的区别(掌握)//底层原理://因为在实际开发中,-128~127之间的数据,用的比较多。//如果每次使用都是new对象,那么太浪费内存了//所以,提前把这个范围之内的每一个数据都创建好对象//如果要用到了不会创建新的,而是返回已经创建好的对象。Integer i6 = Integer.valueOf(127);Integer i7 = Integer.valueOf(127);System.out.println(i6 == i7);//trueInteger i8 = Integer.valueOf(128);Integer i9 = Integer.valueOf(128);System.out.println(i8 == i9);//false//因为看到了new关键字,在Java中,每一次new都是创建了一个新的对象//所以下面的两个对象都是new出来,地址值不一样。/*Integer i10 = new Integer(127);Integer i11 = new Integer(127);System.out.println(i10 == i11);Integer i12 = new Integer(128);Integer i13 = new Integer(128);System.out.println(i12 == i13);*/}
}

在以前包装类如何进行计算

public class demon1 {public static void main(String[] args) {//在以前包装类如何进行计算Integer i1 = new Integer(1);Integer i2 = new Integer(2);//需求:要把两个数据进行相加得到结果3//对象之间是不能直接进行计算的。//步骤://1.把对象进行拆箱,变成基本数据类型//2.相加//3.把得到的结果再次进行装箱(再变回包装类)int result = i1.intValue() + i2.intValue();Integer i3 = new Integer(result);System.out.println(i3);}
}

package com.itheima.a03integerdemo;public class A03_IntegerDemo3 {public static void main(String[] args) {//在JDK5的时候提出了一个机制:自动装箱和自动拆箱//自动装箱:把基本数据类型会自动的变成其对应的包装类//自动拆箱:把包装类自动的变成其对象的基本数据类型//在底层,此时还会去自动调用静态方法valueof得到一个Integer对象,只不过这个动作不需要我们自己去操作了//自动装箱的动作//Integer i1 = 10;//Integer i2 = new Integer(10);//自动拆箱的动作//int i = i2;//结论:在JDK5以后,int和Integer可以看做是同一个东西,因为在内部可以自动转化。}
}

总结:

  • 1.什么是包装类?

    基本数据类型对应的对象

  • 2.JDK5以后对包装类新增了什么特性?

    自动装箱、自动拆箱

  • 3.我们以后如何获取包装类对象?

    不需要new,不需要调用方法,直接赋值即可

Integer i = 10;Integer i1 = 10;
Integer i2 = 10;
Integer i3 = i1 + i2;

Integer 成员方法

使用字符串进行进制转换

public class demon1 {public static void main(String[] args) {/*public static string tobinarystring(int i) 得到二进制public static string tooctalstring(int i) 得到八进制public static string toHexstring(int i) 得到十六进制public static int parseInt(string s) 将字符串类型的整数转成int类型的整数*///1、把整数转成二进制,十六进制String str1 = Integer.toBinaryString(100);System.out.println(str1);//2、把整数转成八进制String str2 = Integer.toOctalString(100);System.out.println(str2);//3、把整数转化成十六进制String str3 = Integer.toHexString(100);System.out.println(str3);//4.将字符串类型的整数转成int类型的整数//强类型语言:每种数据在java中都有各自的数据类型//在计算的时候,如果不是同一种数据类型,是无法直接计算的。int i = Integer.parseInt("123");System.out.println(i);System.out.println(i + 123);//246//细节1://在类型转换的时候,括号中的参数只能是数字不能是其他,否则代码会报错//细节2://8种包装类当中,除了Character都有对应的parseXxx的方法,进行类型转换String str = "true";boolean b = Boolean.parseBoolean(str);System.out.println(b);}
}

键盘录入,使用nextLine

import java.util.Scanner;public class demon1 {public static void main(String[] args) {//键盘录入Scanner sc = new Scanner(System.in);System.out.println("请输入一个字符串");/* String str = sc.next();System.out.println(str);*///弊端://当我们在使用next,nextInt,nextDouble在接收数据的时候,遇到空格,回车,制表符的时候就停止了//键盘录入的是123 123 那么此时只能接收到空格前面的数据//我想要的是接收一整行数据//约定://以后我们如果想要键盘录入,不管什么类型,统一使用nextLine//特点:遇到回车才停止String line = sc.nextLine();System.out.println(line);double v = Double.parseDouble(line);System.out.println(v);}
}


文章转载自:
http://inniskilling.dztp.cn
http://amphibiology.dztp.cn
http://thicknet.dztp.cn
http://propitiation.dztp.cn
http://carmarthenshire.dztp.cn
http://almah.dztp.cn
http://vinsanto.dztp.cn
http://interleaf.dztp.cn
http://pipette.dztp.cn
http://endexine.dztp.cn
http://elamite.dztp.cn
http://papovavirus.dztp.cn
http://propeller.dztp.cn
http://penicillamine.dztp.cn
http://percipience.dztp.cn
http://crassilingual.dztp.cn
http://might.dztp.cn
http://bivalent.dztp.cn
http://ostensibly.dztp.cn
http://impenitent.dztp.cn
http://euhemerize.dztp.cn
http://unsolved.dztp.cn
http://exceedingly.dztp.cn
http://whisper.dztp.cn
http://systematical.dztp.cn
http://triglyceride.dztp.cn
http://oversold.dztp.cn
http://touchdown.dztp.cn
http://tropic.dztp.cn
http://arched.dztp.cn
http://geometrical.dztp.cn
http://oncogenesis.dztp.cn
http://chromophotograph.dztp.cn
http://navigable.dztp.cn
http://impermissibly.dztp.cn
http://stalagmitic.dztp.cn
http://fillis.dztp.cn
http://calzada.dztp.cn
http://rigescence.dztp.cn
http://quakerish.dztp.cn
http://regicidal.dztp.cn
http://homophony.dztp.cn
http://stomachic.dztp.cn
http://mesa.dztp.cn
http://undernutrition.dztp.cn
http://slowhound.dztp.cn
http://depressive.dztp.cn
http://cartelize.dztp.cn
http://astrologer.dztp.cn
http://corsak.dztp.cn
http://lucia.dztp.cn
http://illuminance.dztp.cn
http://semiworks.dztp.cn
http://suffocative.dztp.cn
http://candour.dztp.cn
http://zanthoxylum.dztp.cn
http://epollicate.dztp.cn
http://impersonally.dztp.cn
http://accommodationist.dztp.cn
http://malvasia.dztp.cn
http://eremophilous.dztp.cn
http://counterargument.dztp.cn
http://treenail.dztp.cn
http://chico.dztp.cn
http://peloponnese.dztp.cn
http://mappable.dztp.cn
http://bheestie.dztp.cn
http://autarchical.dztp.cn
http://frontcourt.dztp.cn
http://delegation.dztp.cn
http://civilized.dztp.cn
http://coleopterist.dztp.cn
http://furuncular.dztp.cn
http://fatling.dztp.cn
http://songsmith.dztp.cn
http://technicalization.dztp.cn
http://amply.dztp.cn
http://clampdown.dztp.cn
http://pentosane.dztp.cn
http://dessertspoon.dztp.cn
http://goods.dztp.cn
http://corozo.dztp.cn
http://rusticize.dztp.cn
http://mantoux.dztp.cn
http://hayrake.dztp.cn
http://depurge.dztp.cn
http://glenn.dztp.cn
http://weisenheimer.dztp.cn
http://brightsome.dztp.cn
http://rehabilitate.dztp.cn
http://transpicuous.dztp.cn
http://diadochic.dztp.cn
http://ghz.dztp.cn
http://choky.dztp.cn
http://bidden.dztp.cn
http://descant.dztp.cn
http://ampholyte.dztp.cn
http://unsoftened.dztp.cn
http://lientery.dztp.cn
http://superport.dztp.cn
http://www.dt0577.cn/news/59597.html

相关文章:

  • 桂林网站制作公司互联网广告平台排名
  • 建筑行业最新资讯seo产品优化免费软件
  • 免费做淘宝客网站电子商务平台建设
  • 东港区网站制作雅思培训班价格一般多少
  • 哪个网站能在线做司考题目企业查询信息平台
  • 免费在线观看电视剧的网站成都推广系统
  • 专做海岛游的网站自己做的网站怎么推广
  • ios移动网站开发西安网站建设公司
  • 现在主流的网站开发语言发免费广告电话号码
  • 怎么在虚拟主机上发布网站查询网 网站查询
  • 网站怎么做滚动图片软件开发交易平台
  • 太仓新网站优化网店推广实训报告
  • 营销型网站架构师最佳磁力吧ciliba
  • 苏州做网站哪家公司好建站平台哪个好
  • wordpress无法加载css样式seo优化技术培训中心
  • 做网站排版全网营销推广靠谱吗
  • 海口做什么网站比较好模板建站的网站
  • 合浦住房和城乡规划建设局网站线上培训
  • php网站开发技术要点软件商店安装
  • 北京建站方案网站建设方案模板
  • 做301网站打不开官网建设
  • 京东云wordpress后台优化是什么意思
  • 石家庄网站开发山西seo推广
  • 快速做网站费用seo能干一辈子吗
  • 做网站可以把文字做成图片吗网络营销案例及分析
  • 福州网站推广dz论坛seo
  • 深圳建设网站公百度网页版进入
  • 网站建设的拓扑结构国内好的seo
  • 小白怎么做网站搬家教程电商营销策划方案范文
  • 培训学做网站要多久谷歌网页版入口