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

昌平网站开发多少钱集团公司管理系统

昌平网站开发多少钱,集团公司管理系统,什么是网络运营,东莞创意网站设计效果图在Java中不能自己定义基本数据类型对象#xff0c;为了将基本数据类型视为对象进行处理#xff0c;并能连接相关方法#xff0c;Java为每个基本数据类型都提供了【包装类】如int型数值的包装类【Integer】,boolean型数值的包装类【Boolean】,这样就可以把这些基本数据类型转… 在Java中不能自己定义基本数据类型对象为了将基本数据类型视为对象进行处理并能连接相关方法Java为每个基本数据类型都提供了【包装类】如int型数值的包装类【Integer】,boolean型数值的包装类【Boolean】,这样就可以把这些基本数据类型转换为对象来处理了。 java.lang包中的Integer类Long类Short类可以将基本数据类型int,long,short封装成一个类这些类都是Number的子类区别就是封装了不同的数据类型。 1.Integer Integer类在对象中包装了一个基本类型int的值该类的对象包含一个int类型的字段此外该类提供了多种方法能 在int类型和String类型之间互相转换。 1.1构造方法 Integer类有2种构造方法 1.1.1 Integer(int number) 以int型变量为参数创建Integer对象。 Integer number new Integer(7); 1.1.2 Integer(String str) 以String型变量为参数创建Integer对象。 Integer number new Integer(45);         1.2 常用方法 Integer类的常用方法 方法返回值功能描述Integer.byteValue()byte以byte类型返回该Integer的值Integer.shortValue()short以short类型返回该Integer的值Integer.intValue()int以int类型返回该Integer的值Integer.toString()String返回一个表示该Integer值的String对象Integer.valueOf(String str)Integer返回保存指定String值的Integer对象Integer.parseInt(String str)int返回包含在由str指定的字符串中的数字的等价整数型Integer.compareTo(Integer anotherInteger)int在数字上比较2个Integer对象如果这2个对象相等则返回0如果调用对象的数值小于anotherInteger的数值则返回负值如果调用对象的数值大于anotherInteger的数值则返回正值Integer.equals(Object IntegerObj)boolean比较此对象与另一个对象是否相等 package classInfo;public class summation {public static void main(String[] args) {String[] str {89, 12, 10, 18, 35};int sum 0;//实现将String数组的原酸都转换为int型for (int i 0; i str.length; i) {int myInt Integer.parseInt(str[i]);sum sum myInt;}System.out.println(String数组中的各元素之和 sum);} }输出String数组中的各元素之和164 package classInfo;public class Charac {public static void main(String[] args){String str1 Integer.toString(456); //将Integer对象转换为十进制字符串表示String str2 Integer.toBinaryString(456); //将Integer对象转换为二进制表示String str3 Integer.toHexString(456); //将Integer对象转换为十六进制表示String str4 Integer.toOctalString(456); //将Inter对象转换为八进制表示System.out.println(456的十进制表示为str1);System.out.println(456的二进制表示为str2);System.out.println(456的十六进制表示为str3);System.out.println(456的八进制表示为str4);} }输出456的十进制表示为456456的二进制表示为111001000456的十六进制表示为1c8456的八进制表示为7101.3 常量 Integer类提供了4个常量 1.3.1 MAX_VALUE 表示int类型可取的最大值即2^31 -1。 1.3.2 MIN_VALUE 表示int类型可取的最小值即-2^31。 1.3.3 SIZE 用来以二进制补码形式表示int值的位数。 1.3.4 TYPE 表示基本类型int的class实例。 package classInfo;public class GetCon {public static void main(String[] args){int maxInt Integer.MAX_VALUE; //获取int类型的可取最大值int minInt Integer.MIN_VALUE; //获取int类型的可取最小值int intSize Integer.SIZE; //获取int类型的二进制位数System.out.println(int类型可取最大值是maxInt);System.out.println(int类型可取最小值是minInt);System.out.println(int类型的二进制位数是intSize);} }输出int类型可取最大值是2147483647int类型可取最小值是-2147483648int类型的二进制位数是32 2.Boolean Boolean类将基本类型为boolean的值包装在一个对象中一个Boolean类型的对象只包含一个类型为boolean的字段此外Boolean类还为boolean何String的相互转换提供了许多方法。 2.1 构造方法 2.1.1 Boolean(boolean value) 创建一个表示value参数的Boolean对象 Boolean b new Boolean(true); 2.1.2 Boolean(String str)  创建一个以String变量为参数的Boolean对象如果String参数不为null且忽略大小写时等于true,则分配一个表示true值的Boolean对象否则获得一个false值的Boolean对象。 Boolean bool new Boolean(ok); package classInfo;public class GetBoolean {public static void main(String[] args) {Boolean b1 new Boolean(true); //输出trueBoolean b2 new Boolean(True); //输出trueBoolean b3 new Boolean(null); //输出falseBoolean b4 new Boolean(ok); //输出falseBoolean b5 new Boolean(1); //输出falseSystem.out.println(b1);System.out.println(b2);System.out.println(b3);System.out.println(b4);System.out.println(b5);} }输出truetruefalsefalsefalse 2.2 常用方法 Boolean类的常用方法 方法返回值功能描述Boolean.booleanValue()boolean将Boolean对象的值以对应的boolean值返回Boolean.equals(Object obj)boolean判断调用该方法的对象与obj是否相等。当且仅当参数不为null,且与调用该方法的对象一样都表示同一个boolean值的Boolean对象是才返回trueBoolean.parseBoolean(String str)boolean将字符串参数解析成boolean值Boolean.toString()String返回表示该boolean值的String对象Boolean.valueOf(String str)boolean返回一个指定的字符串表示值的boolean值 package classInfo;import com.sun.org.apache.xpath.internal.operations.Bool;public class GetBoolean {public static void main(String[] args) {Boolean b1 new Boolean(true); //创建Boolean对象Boolean b2 new Boolean(ok); //创建Boolean对象System.out.println(b1: b1.booleanValue());System.out.println(b2: b2.booleanValue());} }输出b1:trueb2:false 2.3 常量 Boolean提供了3个常量: 2.3.1 TRUE 对应基值true的Boolean对象 2.3.2 FALSE         对应基值false的Boolean对象 2.3.3 TYPE 基本类型boolean的class对象 3.Byte Byte类将基本类型为byte的值包装在一个对象中一个Byte类型的对象只包含一个类型为byte的字段此外Byte类还为byte和String的互转提供了方法。 3.1 构造方法 Byte类提供了2种构造方法的重载形式来创建Byte类对象。 3.1.1 Byte(byte value) 以byte型变量为参数创建Byte对象 byte mybyte 45; Byte b new Byte(mybyte); 3.1.2 Byte(String str) 以String型变量为参数创建Byte对象 Byte b new Byte(12); 3.2 常用方法 Byte类的常用方法 方法返回值功能描述Byte.byteValue()byte以一个byte值返回Byte的对象Byte.intValue()int以一个int值返回Byte对象Byte.doubleValue()double以一个double值返回此Byte的值Byte.valueOf(String str)byte返回一个保持指定String所给出的值Byte对象Byte.toString()String返回表示此Byte的值的String对象Byte.equals(Object obj)boolean将此对象与指定对象比较如果此对象与obj相等则返回true,否则返回falseByte.parseByte(String str)byte将String型参数解析成等价的字节(byte)形式Byte.compareTo(Byte anotherByte)int在数字上比较两个Byte对象如果这2个对象相等则返回0如果调用对象的数值小于anotherByte的数值则返回负值如果调用对象的数值大于anotherByte的数值则返回正值 3.3 常量 Byte类中提供4个常量 3.3.1 MIN_VALUE byte类型可取的最小值 3.3.2 MAX_VALUE byte类型可取的最大值 3.3.3 SIZE 用于二进制补码形式表示byte值的位数 3.3.4 TYPE 表示基本类型byte的class实例 4.Character Character类在对象中包装一个基本类型为char的值一个Character类型的对象包含类型为char的单个字段该类提供了几种方法以确定字符的类别大小写字母数字等并将字符从大写转换成小写从小写转换成大写。 4.1 构造方法 4.1.1 Character(char value) 该类的构造函数必须是一个char类型的数据。通过该构造函数创建的Character类对象包含由char类型参数提供的值一旦Character类被创建它包含的数值就不能改变了。 Character mychar new Character(s); 4.2 常用方法 Character类的常用方法 方法返回值功能描述Character.charValue()char返回此Character对象的值Character.compareTo(Character anotherCharacter)int在数字上比较两个Character对象如果这2个对象相等则返回0如果调用对象的数值小于anotherCharacter的数值则返回负值如果调用对象的数值大于anotherCharacter的数值则返回正值Character.equals(Object obj)boolean将调用该方法的对象与指定对象相比较是否想相等Character.toString()String返回一个表示指定char值的String对象Character.toUpperCase(char ch)char将字符参数转换为大写Character.toLowerCase(char ch)char 将字符参数转为小写Character.isUpperCase(char ch)boolean判断指定字符是否为大写字符Character.isLowerCase(char ch)boolean判断指定字符是否为小写字符 package classInfo;public class UpperOrLower {public static void main(String[] args) {Character mychar1 new Character(A); //声明Character对象Character mychar2 new Character(a);System.out.println(mychar1 是大写字母吗: Character.isUpperCase(mychar1));System.out.println(mychar2 是小写字母吗 Character.isLowerCase(mychar2));} }输出A是大写字母吗:truea是小写字母吗true 4.3 常量 Character提供了大量表示特定字符的常量。 4.3.1 CONNECTOR_PUNCTUATION 返回byte型值表示Unicode规范中的常规类别”Pc. 4.3.2 UNASSIGNED 返回byte型值表示Unicode规范中的常规类别“Cn”。 4.3.3 TITLECASE_LETTER 返回byte型值表示Unicode规范中的常规类别“Lt”。 5.Double/Float Double和Float包装类是对double,float基本类型的封装他们都是Number类的子类又都是对小数进行操作所以常用方法基本相同。 Double类在对象中包装一个基本类型为double的值。每个Double类的对象都包含一个double类型的字段此外该类还提供多个方法可以将double转换为String,也可以将String转换为double. 5.1 构造方法 Double类提供了2中构造方法来获得Double类对象 5.1.1 Double(double value) 基于double参数创建Double对象。 5.1.2 Double(String str) 用字符串表示的double类型的浮点值来创建Double对象。 5.2 常用方法 Double类的常用方法 方法返回值功能描述Double.byteValue()byte以byte形式返回Double对象的值(强制转换)Double.intValue()int以int形式返回Double对象的值Double.longValue()long以long形式返回Double对象的值Double.doubleValue()double以doulbe形式返回Double对象的值Double.compareTo(Double d)int在数字上比较两个Double对象如果这2个对象相等则返回0如果调用对象的数值小于Double的数值则返回负值如果调用对象的数值大于Double的数值则返回正值Double.equals(Object obj)boolean将此对象与指定的对象比较Double.valueOf(String str)Double返回保存用参数字符串str表示的double值的Double对象Double.toString()String返回此对象的字符串表示形式Double.isNaN()boolean如果此double值是非数字值(NaN)则返回true;否则返回false; 5.3 常量 Double类提供了一下常量 5.3.1 MAX_EXPONENT 返回int值表示有限double变量可能具有的最大指数。 5.3.2 MIN_EXPONENT 返回int值表示有限double变量可能具有的最小指数。 5.3.3 NEGATIVE_INFINITY 返回double值表示保存double类型的负无穷大值的常量。 5.3.4 POSITIVE_INFINITY 返回double值表示保存double类型的正无穷大值的常量。 6.Number 抽象类【Number】是BigDecimal、BigInteger、Byte、Short、Integer、Long、Float、Double类的父类Number的子类必须提供将表示的数值转换为byte、short、int、long、float、double的方法例如doubleValue()方法返回双精度值floatValue()方法返回浮点值。 6.1 Number类的方法 Number类的方法 方法返回值功能描述Number.byteValue()byte以byte形式返回指定的数值Number.shortValue()short以short形式返回指定的数值Number.intValue()int以int形式返回指定的数值Number.longValue()long以long形式返回指定的数值Number.floatValue()float以float形式返回指定的数值Number.doubleValue()double以double形式返回指定的数值 Number类的方法分别被Number的各子类所实现也就是说Number类的所有子类中都包含以上几种方法。
文章转载自:
http://www.morning.mwjwy.cn.gov.cn.mwjwy.cn
http://www.morning.xhgcr.cn.gov.cn.xhgcr.cn
http://www.morning.cwwts.cn.gov.cn.cwwts.cn
http://www.morning.zpfr.cn.gov.cn.zpfr.cn
http://www.morning.dmldp.cn.gov.cn.dmldp.cn
http://www.morning.nfbxgtj.com.gov.cn.nfbxgtj.com
http://www.morning.tsgxz.cn.gov.cn.tsgxz.cn
http://www.morning.ntyanze.com.gov.cn.ntyanze.com
http://www.morning.pfcrq.cn.gov.cn.pfcrq.cn
http://www.morning.jrkzk.cn.gov.cn.jrkzk.cn
http://www.morning.rnzbr.cn.gov.cn.rnzbr.cn
http://www.morning.azxey.cn.gov.cn.azxey.cn
http://www.morning.qkgwx.cn.gov.cn.qkgwx.cn
http://www.morning.wbyqy.cn.gov.cn.wbyqy.cn
http://www.morning.rnpt.cn.gov.cn.rnpt.cn
http://www.morning.rdmz.cn.gov.cn.rdmz.cn
http://www.morning.ydmml.cn.gov.cn.ydmml.cn
http://www.morning.pnjsl.cn.gov.cn.pnjsl.cn
http://www.morning.kkhf.cn.gov.cn.kkhf.cn
http://www.morning.elsemon.com.gov.cn.elsemon.com
http://www.morning.fpczq.cn.gov.cn.fpczq.cn
http://www.morning.lsnnq.cn.gov.cn.lsnnq.cn
http://www.morning.trsdm.cn.gov.cn.trsdm.cn
http://www.morning.zxzgr.cn.gov.cn.zxzgr.cn
http://www.morning.psdbf.cn.gov.cn.psdbf.cn
http://www.morning.lhxkl.cn.gov.cn.lhxkl.cn
http://www.morning.ykrkq.cn.gov.cn.ykrkq.cn
http://www.morning.yfcbf.cn.gov.cn.yfcbf.cn
http://www.morning.lcqrf.cn.gov.cn.lcqrf.cn
http://www.morning.tknqr.cn.gov.cn.tknqr.cn
http://www.morning.kxscs.cn.gov.cn.kxscs.cn
http://www.morning.dmzqd.cn.gov.cn.dmzqd.cn
http://www.morning.kxnjg.cn.gov.cn.kxnjg.cn
http://www.morning.phcqk.cn.gov.cn.phcqk.cn
http://www.morning.hdpcn.cn.gov.cn.hdpcn.cn
http://www.morning.cwyrp.cn.gov.cn.cwyrp.cn
http://www.morning.mnnxt.cn.gov.cn.mnnxt.cn
http://www.morning.qdlnw.cn.gov.cn.qdlnw.cn
http://www.morning.rgnq.cn.gov.cn.rgnq.cn
http://www.morning.lmdkn.cn.gov.cn.lmdkn.cn
http://www.morning.sh-wj.com.cn.gov.cn.sh-wj.com.cn
http://www.morning.rrgm.cn.gov.cn.rrgm.cn
http://www.morning.hsxkq.cn.gov.cn.hsxkq.cn
http://www.morning.bnmfq.cn.gov.cn.bnmfq.cn
http://www.morning.jfxth.cn.gov.cn.jfxth.cn
http://www.morning.sxmbk.cn.gov.cn.sxmbk.cn
http://www.morning.lqjpb.cn.gov.cn.lqjpb.cn
http://www.morning.fgsct.cn.gov.cn.fgsct.cn
http://www.morning.zlzpz.cn.gov.cn.zlzpz.cn
http://www.morning.zxhhy.cn.gov.cn.zxhhy.cn
http://www.morning.jnbsx.cn.gov.cn.jnbsx.cn
http://www.morning.bktly.cn.gov.cn.bktly.cn
http://www.morning.rqhbt.cn.gov.cn.rqhbt.cn
http://www.morning.ldqrd.cn.gov.cn.ldqrd.cn
http://www.morning.yzygj.cn.gov.cn.yzygj.cn
http://www.morning.hxbps.cn.gov.cn.hxbps.cn
http://www.morning.dgmjm.cn.gov.cn.dgmjm.cn
http://www.morning.tjjkn.cn.gov.cn.tjjkn.cn
http://www.morning.zgdnd.cn.gov.cn.zgdnd.cn
http://www.morning.qtrlh.cn.gov.cn.qtrlh.cn
http://www.morning.spfq.cn.gov.cn.spfq.cn
http://www.morning.fktlg.cn.gov.cn.fktlg.cn
http://www.morning.ryqsq.cn.gov.cn.ryqsq.cn
http://www.morning.lrzst.cn.gov.cn.lrzst.cn
http://www.morning.hjsrl.cn.gov.cn.hjsrl.cn
http://www.morning.cgbgc.cn.gov.cn.cgbgc.cn
http://www.morning.hnhkz.cn.gov.cn.hnhkz.cn
http://www.morning.xcszl.cn.gov.cn.xcszl.cn
http://www.morning.blxor.com.gov.cn.blxor.com
http://www.morning.sfsjh.cn.gov.cn.sfsjh.cn
http://www.morning.hmlpn.cn.gov.cn.hmlpn.cn
http://www.morning.kcsx.cn.gov.cn.kcsx.cn
http://www.morning.hkpyp.cn.gov.cn.hkpyp.cn
http://www.morning.qtqk.cn.gov.cn.qtqk.cn
http://www.morning.ctlzf.cn.gov.cn.ctlzf.cn
http://www.morning.yrwqz.cn.gov.cn.yrwqz.cn
http://www.morning.kqzrt.cn.gov.cn.kqzrt.cn
http://www.morning.qjngk.cn.gov.cn.qjngk.cn
http://www.morning.lbcfj.cn.gov.cn.lbcfj.cn
http://www.morning.jhyfb.cn.gov.cn.jhyfb.cn
http://www.tj-hxxt.cn/news/270689.html

相关文章:

  • 制作自己的网站 域名怎么弄wordpress发布的文章
  • 哪些网站可以发广告产品设计排版模板
  • 内江市住房和城乡建设局网站看房地产的app在哪看
  • 苏州网站开发公司兴田德润放心网页传奇排名
  • 丰都网站建设费用外贸网站建设培训
  • 洛阳网站建设哪家好零食网站建设规划书
  • 做网站的商家怎么后去流量费百度热搜词排行榜
  • 天津手机网站建站培训配置外网访问WordPress
  • 网站建设免费维护内容天津做艺术品的网站
  • 网站备案网站负责人六安网站建设推荐
  • 网站优化外包推荐做网站有什么优势
  • 做婚宴的网站有哪些如何删除wordpress每个栏目页面下方的分类目录归档
  • 建站教程的实现方式公司网站的专题策划
  • flash静态网站房地产网站怎么推广
  • 简述电子商务网站开发的基本原则p2p网站如何建设
  • 正规的营销型网站建设公司设计网站源码
  • 网站开发的五个阶段四川建设人才网官网首页
  • 舆情信息贵阳网站搜索优化
  • 上海做网站的的公司手机开发和网站开发前景
  • 滨州网站建设模板建设自己做网站需要什么条件
  • 网站开发设计比赛建e室内设计网官网模型
  • 福州住房和建设局网站电话营销技巧和营销方法
  • 公司的网站建设费进入什么科目新品发布会ppt
  • 品牌创意型网站建设用jsp做视频网站
  • 自己建一个网站怎么赚钱私人诊所网站源码
  • 做淘宝网站用什么软件广州市建筑信息平台
  • 企业网站城市分站系统wordpress friday
  • 宁波建网站公司四川微信网站建设推广
  • 长春网站建设小程序哈尔滨建站公司模板
  • 网站建设服务非常好湖南岚鸿公司乡镇医院网站建设