Book Image

Programming Kotlin

Book Image

Programming Kotlin

Overview of this book

Quickly learn the fundamentals of the Kotlin language and see it in action on the web. Easy to follow and covering the full set of programming features, this book will get you fluent in Kotlin for Android.
Table of Contents (20 chapters)
Programming Kotlin
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Packages


Packages allow us to split code into namespaces. Any file may begin with a package declaration:

    package com.packt.myproject 
    class Foo 
    fun bar(): String = "bar" 

The package name is used to give us the fully qualified name (FQN) for a class, object, interface, or function. In the preceding example, the class Foo has the fully qualified name com.packt.myproject.Foo and the top level function bar has the fully qualified name of com.packt.myproject.bar.