Quiz on AI
Interviews Prep
Live Training
Corporate Training
AI
ML
GenAI
Data Science
R
Python
Pandas
PyTorch
NumPy
Scipy
Maths Statistics
AI Agents
Matplotlib
AI Tools
SQL
Data Analytics
C
C++
More >>
Html
Javascript
Data Structure
JAVA
CSS
Swift
Azure Cloud
AWS Cloud
DevOps
Microservices
PHP
MYSQL
MongoDB
Redis
Angular
React
C#
DJango
Quantum Computing
TypeScript
CyberSecurity
Oracle
Blockchain
Java Tutorials
Java Introduction
Java Variables
Java Data Types
Java Operators
Java Strings
Java Booleans
Java If-Else
Java Switch
Java While Loop
Java For Loop
Java If-Else.
The Java if-else statement tests the condition. It executes the if block if condition is true otherwise else block is executed.
Example -
if (condition) { // codes in if block } else { // codes in else block }