> For the complete documentation index, see [llms.txt](https://george-jen.gitbook.io/data-science-and-apache-spark/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://george-jen.gitbook.io/data-science-and-apache-spark/scala-if-statement.md).

# Scala if statement

Conditional statement

```
if (a>1)
   print("a is greater than 1")
else if (a==1)
   print("a is equal to 1")
else
   print("a is less than 1")
```
