当前位置:网站首页>进制与转换、关键字
进制与转换、关键字
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("\'单引号\'")
}
}
边栏推荐
- 关于#SQL#的问题,如何解决?
- slice、splice、split傻傻分不清
- PDMan-domestic free general database modeling tool (minimalist, beautiful)
- JWT
- What's up with VS "Cannot find or open PDB file"?How to solve
- 小程序毕设作品之微信美食菜谱小程序毕业设计成品(3)后台功能
- [Cloud Residency Co-Creation] Huawei Cloud Global Scheduling Technology and Practice of Distributed Technology
- 周鸿祎称微软抄袭 360 安全模式后发文否认;英特尔CEO基辛格回应市值被AMD超越:股价下跌是咎由自取|极客头条
- CTFshow,命令执行:web33
- How to implement deep copy in js?
猜你喜欢

还在纠结报表工具的选型么?来看看这个

Node's traditional and advanced practices for formatting time (moment)

What is a stepper motor?40 pictures to show you!

Golang内存分析工具gctrace和pprof实战

WLAN networking experiment of AC and thin AP

如何解决 chrome 浏览器标签过多无法查看到标题的情况

Comprehensive experiment BGP

可视化——Superset安装与部署

Three chess (C language implementation)

Qt 支持HEIC/HEIF格式图片
随机推荐
mysql login in cmd and basic operations of database and table
MTK6225-紧急电话
ClickHouse入门介绍与其特性
PowerPC技术与市场杂谈
Go-Excelize API source code reading (8) - GroupSheets(sheets []string), UngroupSheets()
Google Earth Engine APP——15行代码搞定一个inspector高程监测APP
Glassmorphism design style
编码解码(btoa、encodeURIComponent、encodeURI、escape)
Drawing arrows of WPF screenshot control (5) "Imitation WeChat"
我是如何保护 70000 ETH 并赢得 600 万漏洞赏金的
企业微信群:机器人定时提醒功能数据库配置化
Mysql index related knowledge review one
[Software Architecture Mode] The difference between MVVM mode and MVC mode
数仓分层简介(实时数仓架构)
基于ModelArts的物体检测YOLOv3实践【玩转华为云】
C#/VB.NET 将PPT或PPTX转换为图像
shell脚本------条件测试 if语句和case分支语句
redis
Meeting OA (Upcoming Meetings & All Meetings)
浏览器快捷键大全