zoukankan      html  css  js  c++  java
  • 9.18号作业 朱丽1636050061

    /*程序员:朱丽

    1、输出一个长整型的变量*/

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

        {
        long L=123456789012345L;
        System.out.println(L);
        }
    }

    //    2、输出一个单精度的小数常量

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

        {
        float f=7.7f;
        System.out.println(f);
        }
    }

     //   3、输出一个布尔类型的变量

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

        {
        boolean b=true;
        b=false;
        System.out.println(b);
        }
    }

    //  4、强制类型转换

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

        {
        byte b=7;
        b=(byte)(b+200);
        System.out.println(b);
        }
    }

    //   5、输出一个字符型的加法运算

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

        {
        System.out.println((char)('你'+1));
        }
    }

     //  6、演示变量的溢出结果

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

        {
        int l=0xaaaaaaa;
        System.out.println(l);
        }
    }

     //  7、算术运算符+-*/

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

        {
        int x=20;
        x=x/2*100;
        System.out.println(x);
        }
    }

  • 相关阅读:
    (二十五)Struts2 Tiles集成
    (二十四)Struts2 Spring集成
    etcd 和 redis的使用场景
    react v16.12 源码阅读环境搭建
    gmail邮箱怎么批量删除邮件
    动态创建的元素怎么做动画
    Window 添加定时任务
    commons-pool2-中的一些配置
    Activiti 5.18 流程Model 转成 流程BPMN文件
    Activiti 使用自己的身份认证服务
  • 原文地址:https://www.cnblogs.com/zhuli-1/p/7553895.html
Copyright © 2011-2022 走看看