import java.util.*;
import java.lang.*;
import java.io.*;
public class Example {
public static void main(String[] args) {
int age=20;
if(age>18){
System.out.print("Age is greater than 18");
}
}
}
Java
Program to implement if statement.

Written by
View ProfileNikhil Juneja
Passionate software developer and technical contributor at TutorialsLink.
