java 声明并初始化整型变量

 

 

public class Sample {

    public static void main(String[] args) {
        int num;
        num = 5;
        System.out.println("the value of num is " + num);
    }
}



OUTPUT:
the value of num is 5

 

posted @ 2019-12-19 09:33  anobscureretreat  阅读(1525)  评论(0编辑  收藏  举报