package com.sudhirtheindian2.java123;
public class ternary_operator {
public static void main(String[] args) {
// How to use ternary operator in java
// syntax
// (?:) (a>b>c)
// find the greatest number among a,b and c
int a=2,b=3,c=400;
int result= (a>b)?(a>c?a:c):(b>c?b:c);
System.out.println(result);
}
}
Computer Storage Units Converter Computer Storage Units Converter From: Bytes Kilobytes Megabytes Gigabytes Terabytes Value: To: Bytes Kilobytes Megabytes Gigabytes Terabytes Convert
टिप्पणियाँ
एक टिप्पणी भेजें