Nested if-else Statements in Java

preview_player
Показать описание
Java Programming: Nested if-else Statements in Java Programming
Topics Discussed:
1. Nested if-else statements in Java.
2. if-else ladder in Java.

Music:
Axol x Alex Skrindo - You [NCS Release]

#JavaByNeso #JavaProgramming #NestedifelseStatements
Рекомендации по теме
Комментарии
Автор

Thanks so much, man! I only watched the first 44 secs to get what I'm looking for. Appreciate it!

IDENTIDADVISUAL
Автор

Am here in 2024, thank you for making my java journey abit easier 😊

QueenChisomoSosola-zkyh
Автор

STUDENTS BEWARE: This assessment of the code is incorrect. Java ignores whitespace, so there is no nesting here, it's simply a regular IF/ELSE IF/IF statement. This is a great example of why best practice is to use brackets with your conditional statements. It's also a good example of why certain languages use "elif" instead of "else if" - Python does this, for example. In your case, the logic would work the same even if you added brackets after the first else, but this is not always the case. I'd give you an example, but this is meant as a short comment.

wintermute
Автор

If I want total all videos of java what can I do sir???How can I get all videos????

venkataswamykadiyam
Автор

i can already tell your Lebanese from the accent, but thanks a lot mate.

mhamadayoubi
Автор

When you say it saves time does it mean the time for compilation? 🤨

ArenDeager
Автор

import java.util.Scanner;
public class codechef{
public static void main(String args[]){
Scanner oii = new Scanner(System.in);
int n = oii.nextInt();

if(n>10){
System.out.println("n is greater than 10");

}
else if(n==10){
System.out.println("n is equal to 10");

}
else{
System.out.println("n is less than 10");
}
}
}

lokeshhs