⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intdemo.java

📁 Java学习源代码检索系统免费版
💻 JAVA
字号:
//==============================================================
// IntDemo.java - Demonstrates integer variables
//
// Java学习源代码检索系统 Ver 1.0 20031015 免费正式版
// 版权所有: 中国IT认证实验室(www.ChinaITLab.com)
// 程序制作: ChinaITLab网校教研中心
// 主页地址: www.ChinaITLab.com    中国IT认证实验室
// 论坛地址: bbs.chinaitlab.com  
// 电子邮件: Java@ChinaITLab.com
//==============================================================

class IntDemo {
 public static void main(String args[]) {

  // Values in decimal, hex, and octal
  int decimalCount = 123; // decimal 123
  int hexCount = 0xF89C;  // decimal 63644
  int octalCount = 037;   // decimal 31

  // Display preceding variables
  System.out.println("decimalCount = " + decimalCount);
  System.out.println("hexCount     = " + hexCount);
  System.out.println("octalCount   = " + octalCount);

  // Variables of each integer data type
  byte byteCount = 0x0F;
  short shortCount = 32767;
  int intCount = 99999;
  long bigNumber = 0x7FFFFFFFFFFFFFFFL;  // Note final L

  // Display preceding variables
  System.out.println("byteCount    = " + byteCount);
  System.out.println("shortCount   = " + shortCount);
  System.out.println("intCount     = " + intCount);
  System.out.println("bigNumber    = " + bigNumber);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -