intdemo.java

来自「本书属于《开发专家之 Sun ONE》系列丛书」· Java 代码 · 共 31 行

JAVA
31
字号
//IntDemo.java
class IntDemo
{
    public static int MAXINTEGER = 100;
	public IntDemo()
	{
	}
	public void demoUsing()
	{
	    byte     btByteValue = 5;
	 	int      nIntegerValue = 10;
	    short    sShortCalue = 20;
	    long     lLongValue=0;
	
       	for(;;)
       	{
			lLongValue = lLongValue + btByteValue;
			lLongValue = lLongValue + nIntegerValue;
			lLongValue = lLongValue + sShortCalue;
           if( lLongValue > MAXINTEGER )
             break;
       	}
	    System.out.println("在本程序中整数变量的最大值:" +lLongValue);
	}
	public static void main(String[] args)
	{
		IntDemo aIntDemo = new IntDemo ();
	    aIntDemo.demoUsing ();
	}
}

⌨️ 快捷键说明

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