The rules engine DSL (Domain Specific Language) is built with XTend. Afaik XTend itself is built with Java, so the openHAB rules DSL is near to (but not the same as) Java.
The domain specific part e.g. is support of Items, triggers and so on.
If posting code, please, whenever possible, use text instead of pictures. Use code fences to format code as code.
In the discourse forum software there is an issue which prevents the code fences buttons to be visible, but you can still use them (between date/time and gear symbol) or simply type three backticks before and after the code (nothing else in the line):
```
Your code goes here
```