当前位置:网站首页>进制与转换、关键字
进制与转换、关键字
2022-08-01 10:13:00 【菜鸟教程*…*】
进制与转换
计算机进制通常有:十进制、二进制、八进制、十六进制
short s1=10;
int s2 = s1+1;//要转换成int类型才可以
System.out.println(s2);
//byte short int 在计算时会自动转换为int类型
short s1=10;
s1=(short)(s1+b);
System.out.println(s1);
//把大的容量类型转换为小的容量类型,需要添加强制类型转换,有可能造成精度的降低或数据溢出,使用时要小心
int x =
关键字

转义字符

//转义字符;用于转义的符号是:\
public class Test4{
public static void main(String[] args){
System.out.print("转义字符测试");
System.out.print("我想输出一个回车符\n\r");
System.out.print("\t这是一个制表符");
System.out.print("\\");
System.out.print("\"双引号\"");
System.out.print("\'单引号\'")
}
}
边栏推荐
- Batch大小不一定是2的n次幂!ML资深学者最新结论
- SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
- Py之yellowbrick:yellowbrick的简介、安装、使用方法之详细攻略
- Comprehensive experiment BGP
- STM32 personal notes - program run and fly
- 小程序毕设作品之微信美食菜谱小程序毕业设计成品(4)开题报告
- CTO strongly banning the use of the Calendar, that in what?
- Naive Bayes--Study Notes--Basic Principles and Code Implementation
- Explain / Desc execution plan analysis
- 我是如何保护 70000 ETH 并赢得 600 万漏洞赏金的
猜你喜欢
随机推荐
PDMan-国产免费通用数据库建模工具(极简,漂亮)
【cartographer ros】10: Delay and error analysis
Three chess (C language implementation)
ClickHouse入门介绍与其特性
什么是步进电机?40张图带你了解!
JWT
怎么找出电脑隐藏的软件(如何清理电脑隐藏软件)
Guangyu Mingdao was selected into the list of pilot demonstration projects for the development of digital economy industry in Chongqing in 2022
【云驻共创】分布式技术之华为云全域调度技术与实践
MacOS下postgresql(pgsql)数据库密码为什么不需要填写或可以乱填写
7. SAP ABAP OData 服务如何支持 $orderby (排序)操作
阿里腾讯面试一二
还在纠结报表工具的选型么?来看看这个
分类预测 | MATLAB实现1-DCNN一维卷积神经网络分类预测
EasyRecovery热门免费数据检测修复软件
MySQL 必现之死锁
How programmers learn open source projects, this article tells you
mysql login in cmd and basic operations of database and table
Visualization - Superset installation and deployment
notes....









