How to Use -equal To- Operator to Evaluate a Boolean Expression in Java


In this example we will show you how to use the -equal to- operator to evaluate a boolean expression in Java.

Source Code

package com.beginner.examples;

public class EqualTo {
  public static void main(String[] args) {
    int i = 12;
    System.out.println(i == 12); // use the -equal to- operator
  }
}

Output:

true
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments