集册 Java实例教程 创建多个变量,为其分配初始值,并将其中两个显示为输出。

创建多个变量,为其分配初始值,并将其中两个显示为输出。

欢马劈雪     最近更新时间:2020-01-02 10:19:05

497
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
创建多个变量,为其分配初始值,并将其中两个显示为输出。

public class Main {
/* from 
时 代 J a v a 公 众 号*/


    public static void main(String[] arguments) {

        final char UP = 'U';

        byte initialLevel = 12;

        short location = 13250;

        int score = 35100;

        boolean newGame = true;


        System.out.println("Level: " + initialLevel);

        System.out.println("Up: " + UP);

    }
    /**
    来 自 时   代    Java - nowjava.com
    **/

}