In this section, we will learn how to use Java code in a Kotlin file. For the sake of simplicity, begin by creating a package and adding both Java and Kotlin files in one place, as we know that Kotlin makes it possible to keep both Java and Kotlin files in one project. So, we have two Java classes, called CallJava and Shape, and in the same folder we have one Kotlin file, called FromKotlin:
![](https://static.packt-cdn.com/products/9781789617726/graphics/assets/23b9c948-cf93-45cc-9ec2-ea8d9f05906e.png)
Let's start with the Java static variable and function.