UrbanPro
true

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

CONDITIONAL STATEMENT - IF ELSE

Khushi A.
23/05/2019 0 0

1. IF condition

only if is true conditon is required.

if(condition)
{
//statements
}


2. IF-ELSE condition

1. to check whether the condition will be true or false.
syntax of if-else
2. only 1 condition
if(condition)
{
//statements
}
else
{
//statements
}


3. if - else if

we can add "else if" to execute multiple conditions

syntax
if(condition)
{
//statements
}
else if(condition)
{
//statements
}
else if(condition)
{
//statement
}
else
{
//statement
}


4. Nested if-else condition
if(condition)
{
//statements
if(condition)
{
//statement
}
else
{
//statement
}
//statement
}
else
{
//statements
if(condition)
{
// statement
}
else if(condition)
{
//statement
}
else
{
//statement
}
}

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

Class and Objects in Java
Class is a template or a blueprint which is used to describe an object. On other hand Object is a reference of a class which follows all the stuff written inside the class. How about taking the whole tour in the following video

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

Lambda Expressions in Java
A lambda expression, introduced in Java 8 is similar to a block of code resembling an anonymous function that can be passed to constructors or methods for execution as an argument. Examples: a)() ->...

Android : Support multiple themes in an android application
If you are developing a theme based application to enhance user experience, then following steps needs to follow.We are taking example of an android application having 2 themes white and black.Step 1:Define...

Java Overview
Java platform overview Java platform components The Java platform consists of the following components. The Java language Like any programming language, the Java language has its own structure, syntax...
A

Akshay Shende

0 0
0
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more