zoukankan      html  css  js  c++  java
  • 第一个方法(初学)

    顺序结构 开始-代码一-代码二-代码三-结束
    判断语句:if(关系表达式){ 主体 }
    : if (关系表达式) { 主体 }else { 主体 }
    :if(关系表达式){ 主体} else if(主体) else()
    switch后面笑括号当中可以放的数据类型如下:byte short char int 字符串string
    enum 枚举

    switch匹配到哪一个case向下执行直到遇到break或者整体结束才结束.


    for(初始化表达式;布尔表达式;步进表达式;){循环体}
    while(布尔表达式){循环体 ,步进表达式}
    do{主体}while(布尔表达式)

    public class LuckenF{
      public static void main(String[] args){
        System.out.println("Lucken,I want to tell you sth !");
        System.out.println("Lucken,I want to tell you sth !");
        JL();
        System.out.println("****************");
        System.out.println("****************");
        LJ();
      }
      public static void JL(){
        int num=1;
        if(num==1){
          System.out.println("嘿 jae 你知道吗 发生了故事");
        }
        else
          System.out.println("message.....");
      }
      public static void LJ(){
      int num=3;
      if(num==1){
        System.out.println("我不知道你在想什么!");
      }
      else if(num==2){
        System.out.println("message.....");
      }
      else
        System.out.println("我也思念你了");
      }

    }

  • 相关阅读:
    navicat for mysql (本人亲测,真实有效)
    python 8 days
    python 19 days
    python 20 days
    python 21 days
    python 10 days
    python 9 days
    python 14 days
    python 15 days
    python 16 days
  • 原文地址:https://www.cnblogs.com/worldof/p/10669624.html
Copyright © 2011-2022 走看看