码迷,mamicode.com
首页 > 其他好文 > 详细

基本数据类型课上练习

时间:2015-12-31 01:43:33      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:

package hjsg;

public class fff {

    public static void main(String[] args) {

        System.out.println("hello");
        byte mybyte=121;
        System.out.println("mybyte=124");
        short myshort=2456;
        System.out.println(myshort);
        
    int myint=123654;
    long mylong=313131352123L;
    
    System.out.println(mybyte+myshort*myint*mylong)    ;
    float myfloat=3.25642f;
    double d1=125.321;
    char mychar=‘a‘    ;
    System.out.println(mychar);
    double result=mybyte+myshort+myint+mylong+myfloat+d1;
    System.out.println(result);    
    char mychar2=97;
    System.out.println(mychar2);
    System.out.println("今天学了数据类型\n我很高兴");
    System.out.println("今天学了数据类型\r我很高兴");
    boolean good=true;
    boolean bad=false;
    System.out.println(good);
    final int fist=1;
    System.out.println(fist);
        
        
    }

}

 

基本数据类型课上练习

标签:

原文地址:http://www.cnblogs.com/crazy-zw/p/5090481.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!