Uppercase or lowercase L means long (however, using a lowercase l is confusing because it can look like the number one)

long l = 200L;

Uppercase or lowercase F means float.

float f = 200F;

Uppercase or lowercase D means double.

double d = 200D;

Hexadecimal (base 16), which works with all the integral data types, is denoted by a leading 0x or 0X followed by 0-9 or a-f either in uppercase or lowercase.

Notice in the preceding code the maximum possible hexadecimal values for char, byte, and short.

char c = 0Xffff;
byte b = 0X7f;
short s = 0X7fff;

Octal (base 8) is denoted by a leading zeroin the number and digits from 0-7.

int i = 0200;

This is easily accomplished with the static toBinaryString( ) methods from the Integer and Long classes.

Notice that when passing smaller types to Integer.toBinaryString( ), the type is automatically converted to an int.

Literals的更多相关文章

  1. Python Set Literals

    现有3种方式创建set() >>> def f(): ... return set([1, 2, 3]) ... >>> def h(): ... return s ...

  2. java Literals

    Primitive Data Types The Java programming language is statically-typed, which means that all variabl ...

  3. thymeleaf中的Literals

    Literals即为文字 一.Text literals:文本文字 文本文字只是字符串指定的单引号之间.他们可以包含任何字符,但你应避免任何单引号里面\ ' <p> Now you are ...

  4. A Tour of Go Map literals

    Map literals are like struct literals, but the keys are required. package main import "fmt" ...

  5. 解决author波浪线Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click

    自从把默认的头注释的author改成自己的名字以后越看越顺眼,但是发现名字下面一直有个波浪线,强迫症简直不能忍. 然后当你把鼠标放上去,再点击提示上的"more",会看到下面的提示 ...

  6. How to distinguish between strings in heap or literals?

    Question: I have a use case where I can get pointers of strings allocated either in memory or litera ...

  7. Template literals

    [Template literals] Template literals are string literals allowing embedded expressions. You can use ...

  8. C++11中的raw string literals

    作为一名C++书看得少得可怜的新手,我一直没有勇气去系统地学习一下C++ 11添加的新特性.不过,平日里逛论坛,阅读大犇们的博客,倒是了解了一些.比如,这个帖子: 如何绕过g++ 4.8.1那个不能在 ...

  9. react 使用 ref 报错 ,[eslint] Using string literals in ref attributes is deprecated. (react/no-string-refs)

    react 项目中给指定元素加事件,使用到 react 的 ref 属性,Eslink 报错 [eslint] Using string literals in ref attributes is d ...

  10. xcode中一些便捷用法@literals简写

    总结一下,新的属性绑定规则如下: ●  除非开发者在实现文件中提供getter或setter,否则将自动生成 ● 除非开发者同时提供getter和setter,否则将自动生成实例变量 ●  只要写了s ...

随机推荐

  1. David Malan teaching CS75 lecture 9, Scalability

    https://youtu.be/-W9F__D3oY4 Storage PATA, SATA, SAS (15,000 rpm), SSD, RAID0 : striping, double thr ...

  2. 《深入分析Java Web技术内幕》读后感(Tomcat)

    第11章 P286 Tomcat总体结构 1.service 2.server 3.组件的生命 Connector Container 1.容器的总体设计 2.Engine容器 3.Host容器 4. ...

  3. jsp九大内置对象与servlet中java对象

    jsp九大内置对象 request对象 :  getParameter(String name)获取表单提交的数据 getParamegerNames() 获取客户端提交的所有参数名 getAttri ...

  4. 世界虽大,但没有破不了的wifi

    附加知识: 无线网卡的几种常见工作模式(mode)有: master  managed monitor ad-hoc ... 1. [master] 这种模式是常见的AP模式,无线模块本身作为wifi ...

  5. .net过滤器重写beginrequest

    在J2EE Web开发中有过滤器filter,该filter可以对指定的URL访问进行拦截,并执行过滤器的方法,根据实际应用情况,在过滤器中修改请求的代码.判断会话信息,也可以做权限控制,总之这个过滤 ...

  6. Widows下Faster R-CNN的MATALB配置(CPU)

    目录 1. 准备工作 2. VS2013编译Caffe 3. Faster R-CNN的MATLAB源码测试 说实话,费了很大的劲,在调试的过程中,遇到了很多的问题: 幸运的是,最终还是解决了问题: ...

  7. [软件工程基础]Alpha 阶段事后分析

    设想和目标 1. 我们的软件要解决什么问题?是否定义得很清楚?是否对典型用户和典型场景有清晰的描述? 帮助选修物理实验的学生撰写实验报告,计算实验数据,验证计算结果,并提供一个讨论的平台. 全体成员认 ...

  8. 1081 Rational Sum(20 分)

    Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. ...

  9. Golang 入门系列(十三)用Beego开发web应用

    接着之前的内容,前面已经讲过很多Golang的基础语法,mysql的使用,redis的使用,也讲了orm框架,如何创建一个webapi 服务等等,感兴趣的可以看看以前的文章,https://www.c ...

  10. Java微信公众平台开发(十一)--微信JSSDK中Config配置

    JSSDK曾经引爆前端以及后端的工程师,其魔性的力量毋庸置疑,在我们的技术眼里它的实现原理和根本是不能够被改变的,这篇文章就不对其js的实现做任何评价和解说了(因为我也不是很懂,哈哈),这里要说的是它 ...