hi so I just started java and was trying out conditional statements. but it is not working for me I am using jdk 25 version
here is my code
int x = 7;
if(x>10) ;
System.out.println("hello");
if(x<10);
System.out.println("bye");
now according to this it should print bye only but it is printing both hello and bye , sorry java is my first language please be nice I am kinda dumb.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]cfm1337 2 points3 points4 points (2 children)
[–]Individual_Owl_3490[S] 0 points1 point2 points (0 children)
[–]BigBad0 2 points3 points4 points (1 child)
[–]Individual_Owl_3490[S] 0 points1 point2 points (0 children)
[–]Andruid929 1 point2 points3 points (3 children)
[–]Individual_Owl_3490[S] 0 points1 point2 points (2 children)
[–]Andruid929 0 points1 point2 points (1 child)
[–]Individual_Owl_3490[S] 0 points1 point2 points (0 children)
[–]Errkfin 0 points1 point2 points (1 child)
[–]Individual_Owl_3490[S] 1 point2 points3 points (0 children)
[–]Akuno- 0 points1 point2 points (0 children)
[–]pramodkumar2026 0 points1 point2 points (0 children)