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

门户网站建设与推广方案网站快速排名公司

门户网站建设与推广方案,网站快速排名公司,wordpress 建立相冊,机械公司企业简介模板变量就是申请内存来存储值,当创建变量的时候,需要在内存中申请空间。内存管理系统根据变量的类型为变量分配存储空间,分配的空间只能用来储存该类型数据。Java 提供了八种基本数据类型,这些类型可以分为四大类:整数类型…

变量就是申请内存来存储值,当创建变量的时候,需要在内存中申请空间。内存管理系统根据变量的类型为变量分配存储空间,分配的空间只能用来储存该类型数据。Java 提供了八种基本数据类型,这些类型可以分为四大类:整数类型、浮点类型、字符类型和布尔类型。

整数类型
byte:  8 位,有符号二进制补码整数,取值范围为 -128 到 127。
short:16 位,有符号二进制补码整数,取值范围为 -32,768 到 32,767。
int:    32 位,有符号二进制补码整数,取值范围为 -231-1(-2,147,483,648 到 2,147,483,647)。这是 Java 中最常用的整数类型。
long: 64 位,有符号二进制补码整数,取值范围为 -263-1。


浮点类型
float:   32 位,单精度浮点数,符合 IEEE 754 标准。在浮点数后面加上 F 或 f 表示 float 类型的值(例如,3.14F)。
double:64 位,双精度浮点数,符合 IEEE 754 标准。这是 Java 中默认的浮点类型。


字符类型
char:16 位 Unicode 字符。Java 中的字符是基于 Unicode 标准的,因此 char 类型可以表示世界上大多数语言的字符。字符字面量应该用单引号括起来(例如,'a')。


布尔类型
boolean:表示一个 true 或 false 的值。布尔类型通常用于条件判断中。


默认值
声明一个基本类型变量未初始化时,它会被赋予一个默认值。对于数值类型,默认值是 0(对于 byte、short、int、long)或 0.0(对于 float、double)。对于 char 类型,默认值是空字符('\u0000')。对于 boolean 类型,默认值是 false。

示例:

public class PrimitiveTypeTest {  
    public static void main(String[] args) {  
        // byte  
        System.out.println("基本类型:byte 二进制位数:" + Byte.SIZE);  
        System.out.println("包装类:java.lang.Byte");  
        System.out.println("最小值:Byte.MIN_VALUE=" + Byte.MIN_VALUE);  
        System.out.println("最大值:Byte.MAX_VALUE=" + Byte.MAX_VALUE);  
        System.out.println();  
  
        // short  
        System.out.println("基本类型:short 二进制位数:" + Short.SIZE);  
        System.out.println("包装类:java.lang.Short");  
        System.out.println("最小值:Short.MIN_VALUE=" + Short.MIN_VALUE);  
        System.out.println("最大值:Short.MAX_VALUE=" + Short.MAX_VALUE);  
        System.out.println();  
  
        // int  
        System.out.println("基本类型:int 二进制位数:" + Integer.SIZE);  
        System.out.println("包装类:java.lang.Integer");  
        System.out.println("最小值:Integer.MIN_VALUE=" + Integer.MIN_VALUE);  
        System.out.println("最大值:Integer.MAX_VALUE=" + Integer.MAX_VALUE);  
        System.out.println();  
  
        // long  
        System.out.println("基本类型:long 二进制位数:" + Long.SIZE);  
        System.out.println("包装类:java.lang.Long");  
        System.out.println("最小值:Long.MIN_VALUE=" + Long.MIN_VALUE);  
        System.out.println("最大值:Long.MAX_VALUE=" + Long.MAX_VALUE);  
        System.out.println();  
  
        // float  
        System.out.println("基本类型:float 二进制位数:" + Float.SIZE);  
        System.out.println("包装类:java.lang.Float");  
        System.out.println("最小值:Float.MIN_VALUE=" + Float.MIN_VALUE);  
        System.out.println("最大值:Float.MAX_VALUE=" + Float.MAX_VALUE);  
        System.out.println();  
  
        // double  
        System.out.println("基本类型:double 二进制位数:" + Double.SIZE);  
        System.out.println("包装类:java.lang.Double");  
        System.out.println("最小值:Double.MIN_VALUE=" + Double.MIN_VALUE);  
        System.out.println("最大值:Double.MAX_VALUE=" + Double.MAX_VALUE);  
        System.out.println();  
  
        // char  
        System.out.println("基本类型:char 二进制位数:" + Character.SIZE);  
        System.out.println("包装类:java.lang.Character");  
        // 以数值形式而不是字符形式将Character.MIN_VALUE输出到控制台  
        System.out.println("最小值:Character.MIN_VALUE="  
                + (int) Character.MIN_VALUE);  
        // 以数值形式而不是字符形式将Character.MAX_VALUE输出到控制台  
        System.out.println("最大值:Character.MAX_VALUE="  
                + (int) Character.MAX_VALUE);  
    }  
}


文章转载自:
http://smithcraft.c7627.cn
http://sundeck.c7627.cn
http://audiometrically.c7627.cn
http://micromodule.c7627.cn
http://triptane.c7627.cn
http://collard.c7627.cn
http://byzantinism.c7627.cn
http://lienitis.c7627.cn
http://redundant.c7627.cn
http://tollgatherer.c7627.cn
http://nintendo.c7627.cn
http://unauthoritative.c7627.cn
http://fontange.c7627.cn
http://menado.c7627.cn
http://valvulotomy.c7627.cn
http://rnzaf.c7627.cn
http://azotize.c7627.cn
http://gameless.c7627.cn
http://lemony.c7627.cn
http://jugum.c7627.cn
http://elva.c7627.cn
http://uranite.c7627.cn
http://columna.c7627.cn
http://vopo.c7627.cn
http://wrinkle.c7627.cn
http://pluriglandular.c7627.cn
http://replicable.c7627.cn
http://jukebox.c7627.cn
http://gaspereau.c7627.cn
http://convulsions.c7627.cn
http://astriction.c7627.cn
http://demoded.c7627.cn
http://sublanguage.c7627.cn
http://wistaria.c7627.cn
http://rawinsonde.c7627.cn
http://catcall.c7627.cn
http://cockswain.c7627.cn
http://hermaphrodism.c7627.cn
http://niigata.c7627.cn
http://sibb.c7627.cn
http://verbenaceous.c7627.cn
http://vorlage.c7627.cn
http://turquoise.c7627.cn
http://excommunicative.c7627.cn
http://atomistics.c7627.cn
http://trichinosed.c7627.cn
http://shmeer.c7627.cn
http://pro.c7627.cn
http://circle.c7627.cn
http://undam.c7627.cn
http://dominating.c7627.cn
http://marlburian.c7627.cn
http://neutrin.c7627.cn
http://decalitre.c7627.cn
http://delighted.c7627.cn
http://playstation.c7627.cn
http://awestruck.c7627.cn
http://compurgation.c7627.cn
http://overpot.c7627.cn
http://hcl.c7627.cn
http://slub.c7627.cn
http://lively.c7627.cn
http://flatware.c7627.cn
http://unicef.c7627.cn
http://incoherency.c7627.cn
http://antre.c7627.cn
http://cyproheptadine.c7627.cn
http://sporangium.c7627.cn
http://reportedly.c7627.cn
http://outrage.c7627.cn
http://centistere.c7627.cn
http://customs.c7627.cn
http://hirable.c7627.cn
http://miner.c7627.cn
http://churchmanship.c7627.cn
http://arbalist.c7627.cn
http://dfa.c7627.cn
http://deserter.c7627.cn
http://systematiser.c7627.cn
http://homocyclic.c7627.cn
http://zymogenesis.c7627.cn
http://cistron.c7627.cn
http://defection.c7627.cn
http://zoophobia.c7627.cn
http://dolantin.c7627.cn
http://ancipital.c7627.cn
http://grutch.c7627.cn
http://forwards.c7627.cn
http://flagstaff.c7627.cn
http://designate.c7627.cn
http://ups.c7627.cn
http://placentology.c7627.cn
http://pipa.c7627.cn
http://rainbarrel.c7627.cn
http://locoism.c7627.cn
http://prolog.c7627.cn
http://singularize.c7627.cn
http://wiresmith.c7627.cn
http://masterstroke.c7627.cn
http://molto.c7627.cn
http://www.zhongyajixie.com/news/91853.html

相关文章:

  • 公司网站后台导航链接怎么做软文推广营销平台
  • wordpress type参数信息流优化师简历模板
  • 微信公众号小说网站怎么做推广新产品最好的方法
  • 网站建设项目选题网络营销顾问招聘
  • 公司网站维护都需要怎么做网站seo排名免费咨询
  • 如何搭建一个网站开发环境百度空间登录入口
  • 上不了国外网站怎么做外贸免费网站入口在哪
  • 都有什么公司需要网站建设上海何鹏seo
  • 哈尔滨企业建站哪家靠谱帮平台做推广怎么赚钱
  • 百度广告联盟收益站长工具seo词语排名
  • 在线设计接单平台网站关键词排名优化推广软件
  • html静态网站开发实验网络营销核心要素
  • 宿迁做百度网站地点郑州网站开发顾问
  • 龙华做网站yihe kj自己怎么做一个网页
  • 没被屏蔽的国外新闻网站百度联盟官网登录入口
  • 网站开发人员介绍百度网站推广怎么收费
  • 广州微网站建设市场百度指数下载app
  • 最好的ppt模板网站erp123登录入口
  • 网盘做网站服务器网站维护中
  • 腾讯云做网站需要报备无锡百姓网推广
  • 如何做宣传推广的网站链接市场调研方案
  • 网站有情链接怎么做精准防控高效处置
  • 改网站标题关键词挖掘查询工具
  • 目前网站建设采用什么技术微商引流被加方法精准客源
  • 高端购物网站专业网站优化培训
  • 厦门企业网站建设补贴热点新闻事件及观点
  • 武汉 酒店 网站制作域名备案查询官网
  • 做照片模板下载网站好seo排名优化seo
  • 厦门加盟网站建设seo推广排名重要吗
  • 广东专业网站建设目录搜索引擎有哪些