package Hello
Class Hello {
var height = 1
var width = 2
}
Above is my class i created in Hello.kt
Hello guys, am new to Kotlin and am having an online course on udacity (Introduction to kotlin). Staff started well till when i got to object oriented code.
These guys created a package and add a file Aquarium.kt
In the file, they created a class Class Aquarium and it showed no errors.
But when i try following the same example, mine throws an error
“Error:(3, 1) Kotlin: Expecting a top level declaration”
Been figuring out all day long but couldnot get help on the internet.
(Am on kotlin 1.3.31) using netbeans as my IDE.
Thank you