answersLogoWhite

0

What is the if statement in java?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

The if statement evaluates boolean (true or false) expressions. For example:

if ( a = b ) or

if (4 = 4 )

The first would be true if a was equal to b and false if not. The second would always be true seeing that 4 always equals 4.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the if statement in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What advantage does Java's break statement have over C's break statement?

They do the same thing, but only the former can be used in a Java program.


What does do in java?

You never write "do" seperately in Java. The only situation I can think of when you have to write "do" is in the "do while" statement. This is the syntax: do { statement(s) } while (expression);


What are semicolons used in java?

to end a statement


What is case in java?

Case is used to label each branch in the switch statement in Java Program


What is a simple java code and explain what the code does?

int a;This simple Java statement declares an integer.


What is the use of switch statement in java?

In java, a switch statement is used to simplify a long list of 'if' statements. A switch statement takes the form of:switch (variableName){case condition1; command1;case condition2; command2;...}


What is the statement that every Java application must contain?

free download


How are java program statements terminated?

Each statement in Java ends with a semicolon, for example: int a; a = 5; int b = 10;


What is called OR in Java programming?

If you are going to make an if statement with or, use: Isn't that easy!


In a java statement Math.sqrt what is Math and what is sqrt?

Math is the class, and sqrt() is the method.


Every complete statement ends with a?

Any teacher will expect you to answer by saying a semicolon (;), but this is not strictly true. First of all, the definition of a "line of code" varies from teacher to teacher and textbook to textbook. Second, even the Java Language Specification lists several types of Java statements which do not need to end in a semicolon.In general, a complete Java statement will end in either of semicolon or a closing block brace.


What does INS do?

You never write "do" seperately in Java. The only situation I can think of when you have to write "do" is in the "do while" statement. This is the syntax: do { statement(s) } while (expression);