java First_Number_Second_Number__Equal_Comparision

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java First_Number_Second_Number__Equal_Comparision相关的知识,希望对你有一定的参考价值。

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package BASICJAVA;

import java.util.Scanner;

/**
 *
 * @author ABIR
 */
public class First_Number_Second_Number__Equal_Comparision {
    public static void main(String[]args){
        Scanner abir =new Scanner(System.in);
        System.out.println("Enter your first number");
        int number1=abir.nextInt();
        System.out.println("Enter your second number");
        int number2=abir.nextInt();
        if(number1>number2){
            System.out.println("first is greater");
        }else if(number1<number2) {
            System.out.println("second is greater");
        }else{
            System.out.println("the numbers are equal");
        }
        
    }
}

以上是关于java First_Number_Second_Number__Equal_Comparision的主要内容,如果未能解决你的问题,请参考以下文章

Java_核心基础概念

Java_数组

java 实现 简单画图功能(简单点的)

JAVA 面试基础

Java_多态

Java_继承