zoukankan      html  css  js  c++  java
  • java学习一

    public class Beijing {
    	public static void main (String arge []) {
    		int age=23;//定义int类型
    		long c=2323232;//定义长整型
    		char beij='汉';
    		System.out.print(beij);
    		boolean beijing=false;//定义boolen
    		System.out.println(beijing);
    	}
    }
    //定义
    

      

    public class Dingyi {
    	public static  void main( String args[]) {
    		short a=0;
    		int i=11;
    		long l=22;
    		double d=555;
    		float m=1.9f;
    		System.out.println(i/m*d/l);
    	}
    }
    //运算
    

      

    public class Iftest {
    	public static void main( String args[]) {
    		int i=2;
    		if (i> 1 && i< 11){
    			System.out.println("i是位于1和11");
    		}else {
    			System.out.println("i不是位于1和11之间");
    		}
    	}
    }
    //if语句
    

      

    public class Switchjava {
     public static void main(String args[]) {
        char c='1';
        switch (c) {
            case 'b':
                System.out.println('n');
                break;
            case 'a':
                System.out.println('b');
                break;
            default:
                System.out.println('d');
        }
    }
    }
    //switch语句
  • 相关阅读:
    10/11
    el表达式的坑
    在idea下两个项目之间的maven父子级项目依赖
    树上任意两点间距离
    优先级顺序
    HDU 6447
    KMP
    cf 1029 C
    牛客练习赛25
    莫比乌斯算法
  • 原文地址:https://www.cnblogs.com/leiziv5/p/7890827.html
Copyright © 2011-2022 走看看