About 1,140,000 results
Open links in new tab
  1. Java Program to Find largest of Two Numbers - Tutorial Gateway

    Write a Java program to find the largest of two numbers using Else If Statement and Conditional Operator. This Java program allows the user to enter two different values. Next, this Java …

  2. Java Program to Find Greatest of Two Numbers - PrepInsta

    Given two integer inputs N1 and N2, the objective is to write a code to Find the Greatest of the Two Numbers in Java. In order to do so we’ll compare the numbers using if-else statements.

  3. Java Program to Find Largest of Two Numbers - CodesCracker

    Largest of Two Numbers using Function. This program uses a user-define function named LargestOfTwo(), that takes two numbers as its two arguments and returns the largest between …

  4. Program to Find the Largest Number using Ternary Operator

    Jun 24, 2022 · The task is to write a program to find the largest number using ternary operator among: Two Numbers; Three Numbers; Four Numbers; Examples: Input : 10, 20 Output : …

  5. Program to find the largest of two numbers in Java

    To find the largest of two numbers, follow these steps: Take two numbers. Compare the two numbers using conditional statements. Use an if-else statement to determine which number is …

  6. Beginning Java : Finding the greatest number out of a list

    May 7, 2025 · Take input from keyboard and create a double array and then try below code. double dblArray[] = {24.0,40.2,38.9}; Arrays.sort(dblArray); System.out.print("The greatest …

  7. Find the Greatest of the Two Numbers in Java - Python4U

    Dec 16, 2023 · there are few ways to find the largest or greatest of two numbers in java: Method 1: Using if-else Statements; Method 2: Using Ternary Operator; Method 3: Using inbuilt …

  8. DivyaBadgujar27/Java-Task---Find-Greatest-of-Two-Numbers

    This Java program finds the greatest of two user-input numbers using DataInputStream. It compares the numbers and handles input exceptions using a try-catch block, ensuring smooth …

  9. Java Program to print maximum among two numbers

    In this tutorial, you will learn how to write Java Program to print the maximum or largest number among two numbers. There are various approach to solve and write the program. But in this …

  10. write a program in java to input two numbers and display the greatest

    Oct 10, 2024 · Here is a simple Java program that takes two numbers as input from the user and displays the greatest of the two using the Math.max() method: import java.util.Scanner; public …

Refresh