zoukankan      html  css  js  c++  java
  • 优化变量操作步骤 ----多个变量类型相同时的情况

     1 class Var04{
     2     public static void main(String[] args) {
     3         //将0.1        111.5    -1        51.6值存放在变量中,并输出变量的值
     4         /*double a;
     5         double b;
     6         int c;
     7         double d;*/
     8         //double a,b,d;
     9         //优化,如果有多个变量类型相同时,则可以一次声明多个变量,之间使用英文逗号隔开
    10         double a =0.1, b=111.5, d=51.6;
    11         int c = -1;
    12         System.out.println("a =" + a + "
    b =" + b + "
    d = " + d + "
    c =" + c) ;
    13     
    14     }
    15 }
    坎坷困难会让你不断的强大起来 -- 前提是你别怂
  • 相关阅读:
    GO 函数的参数
    GO 函数
    GO 指针
    GO 结构体
    GO 接口
    码云git常用命令
    GO Map的初步使用
    GO Slice
    GO 数组
    GO 键盘输入和打印输出
  • 原文地址:https://www.cnblogs.com/penphy/p/10205510.html
Copyright © 2011-2022 走看看