If/else, else if condition in java
In this post, we will talk about the conditional handing in java. Let's start with the basics first.
What is a condition?
Condition is a state of something, if that specific state occurs, we say that the condition is fulfilled for that specific state.
Let's see how conditions look in Java:
Before we actually start looking into the code, we expect you know how to write basic Java code. If you do not know, relax, we've got you covered. Check out our starter guide on Java and then continue with this post.

Okay, now that you're geared up, let's jump into the code.
Class Condition {
public static void main(String[] args) {
String text = "We are learning about if conditions.";
if ( text.length() > 10 ) {
System.out.println("Size of text is greater than 10.");
}
}
}This above snippet explains if the size of 'text' variable is greater than 10, we print a line.
Thanks, this post will be updated.