Menu

One Commit at a Time ! Series - 27
📰

One Commit at a Time ! Series - 27

DEV Community: productivity·Annapoorani Kadhiravan·18 days ago
#LYx8a5s4
#devtoproductivity#devto#dev#java#true
Reading 0:00
15s threshold

JAVA

public class Main { public static void main ( String [] args ) { int x = 5 ; System . out . println ( x > 3 && x < 10 ); // returns true because 5 is greater than 3 AND 5 is less than 10 } }

Enter fullscreen mode

Exit fullscreen mode

Explanation :

int x = 5;

Declares an integer variable named x and assigns it the value 5 .

x > 3

Evaluates whether x (which is 5 ) is greater than 3 . This statement is true .

x < 10

Evaluates whether x (which is 5 ) is less than 10 . This statement is true .

x > 3 && x < 10

The && symbol is the logical AND operator.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.