ternary operator in java
// variable= condition ? value if condition is True : value if condition is false
// only ternary operator in java
int max,a=1,b=2;
max= a>b ? a : b;
//will result in max = b
ternary operator in java
// variable= condition ? value if condition is True : value if condition is false
// only ternary operator in java
int max,a=1,b=2;
max= a>b ? a : b;
//will result in max = b
ternärer operator java
int num = 8;
String msg = "";
if(num > 10) {
msg = "Number is greater than 10";
}
else {
msg = "Number is less than or equal to 10";
}
ternary operator in java
// variable= condition ? value if condition is True : value if condition is false
// only ternary operator in java
int max,a=1,b=2;
max= a>b ? a : b;
//will result in max = b
ternärer operator java
int num = 8;
String msg = "";
if(num > 10) {
msg = "Number is greater than 10";
}
else {
msg = "Number is less than or equal to 10";
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us