About 406,000 results
Open links in new tab
  1. if statement - if (boolean condition) in Java - Stack Overflow

    Oct 4, 2018 · The if statement will evaluate whatever code you put in it that returns a boolean value, and if the evaluation returns true, you enter the first block. Else (if the value is not true, it …

  2. Java If Boolean - CodingBat

    Here is a simple if-statement: System.out.println("Dang, it's hot!"); The simplest if-statement has two parts -- a boolean "test" within parentheses ( ) followed by "body" block of statements …

  3. The simplest if-statement has two parts – a boolean "test" within parentheses ( ) followed by "body" block of statements within curly braces { }. The test can be any expression that …

  4. Java If ... Else - W3Schools

    Use the if statement to specify a block of Java code to be executed if a condition is true. Syntax if ( condition ) { // block of code to be executed if the condition is true }

  5. Java if statement - GeeksforGeeks

    Nov 22, 2024 · This code demonstrates how to use an if-else statement to make decisions based on Boolean values. By using an if-else statement, you can control the flow of your program …

  6. How to Use If Statements with Boolean Conditions in Java?

    In Java, if statements are used to execute a block of code based on a boolean condition. This guide covers the structure of if statements, their conditional logic, and best practices.

  7. If Statement in Java - Online Tutorials Library

    Following is the syntax of an if statement −. if(Boolean_expression) { // Statements will execute if the Boolean expression is true } Working of if Statement. If the Boolean expression evaluates …

  8. Java 8 - if Conditional Statement - java8.info

    We can execute one set of statements if the boolean result of the expression evaluates to true and another if the expression evaluates to false. The relational and logical operators are …

  9. Java if - zentut.com

    In this tutorial, you will learn how to use the Java if statement to evaluate a boolean expression and execute a block of code if the expression is true.

  10. java - Boolean use in an if statement - Stack Overflow

    if (a[i] == target) return a[i]; // or i if you want to get ingex of searched element. return -1;

  11. Some results have been removed
Refresh