Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

353
Views
what is the different between Kotlin File/Class and Kotlin Script

i programming kotlin language to some weeks, and i always start with new File/Class, and I've noticed lately to kotlin Script in the menu and i ask now what's different between the Script and the File in kotlin

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In a Kotlin source *.kt file, you can place top-level declarations, such as types and top-level functions and properties, but not code statements that are not nested into some declarations.

A Kotlin Script *.kts file, on contrary, contains code statements on the top level without any nesting. These statements are an equivalent of a main function. It is allowed to contain types, too, but with some limitations similar to those placed on nested type declarations.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!