zoukankan      html  css  js  c++  java
  • JAVA基础

     关键字(。。。。) 标识符的规则:1 不能是关键字或true,false,null  2:标识符可以包含字母,数字,下划线或美元符号$,但不能以数字开头。 3:标识符区分大小写  ( 见名知意  驼峰命名规则  帕斯卡命名法 ) 数据类型  基本类型: int char byte long float double short boolean

    接收输入:
    import java.util.Scanner;
      public class Input{
          public static void main (String[] args){
                Scanner input=new Scanner(System.in);
                int num=input.nextInt();
               // double d=input.nextDouble();
              // String s=input.next();
                    }
       }; 

    0——99的随机数;
       int random=(int)(Math.random()*100);

    常量 
    final 数据类型 常量名=常量值
    (常量名要求全大写)

  • 相关阅读:
    如何让json_decode解码变的更加强壮
    scp命令
    Centos7安装postgresql
    ubuntu安装Java环境
    ubuntu开放端口
    VMware安装Ubuntu
    redis主从安装
    redis主从学习
    redis集群学习
    C++ 09 顺序容器
  • 原文地址:https://www.cnblogs.com/jg22/p/4376129.html
Copyright © 2011-2022 走看看