While watching thenewbostons tutorial on basic java, he teaches us to do if statements like this.(Notice the curly Braces)
if("pie"== "pie"){
System.out.println("Hurrah!");
}
So I tried removing the curly braces
if("pie"== "pie")
System.out.println("Hurrah!");
And it still works! Since I'm new to java, I don't know why that works. And I want to know if removing(or adding) the curly braces give any benefits/disadvantages.