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);
        }
    }

  • 相关阅读:
    理解C#中的 async await
    kube-proxy IPVS 模式的工作原理
    Kilo 使用教程
    Wireguard 全互联模式(full mesh)配置指南
    我为什么不鼓吹 WireGuard
    iTerm2 实现 ssh 自动登录,并使用 Zmodem 实现快速传输文件
    在 Docker Desktop 中启用 K8s 服务
    ABP 适用性改造
    ABP 适用性改造
    在 ASP.NET Core 应用中使用 Cookie 进行身份认证
  • 原文地址:https://www.cnblogs.com/zhuli-1/p/7553895.html
Copyright © 2011-2022 走看看