集册 Java实例教程 算术运算符

算术运算符

欢马劈雪     最近更新时间:2020-01-02 10:19:05

525
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
算术运算符


public class Main {

 

        public static void main(String[] args) {
        /*
        N o w  J a v a  . c o m 提供
        */

               

                System.out.println("Arithmetic operators example :");

               

                int i = 510 + 210;

                int j = i - 10;

                int k = j * 2;

                double l = k / 6;

               

                System.out.println("i = " + i);

                System.out.println("j = " + j);

                System.out.println(
展开阅读全文