Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Introduction to JVM Languages

You're reading from   Introduction to JVM Languages Get familiar with the world of Java, Scala, Clojure, Kotlin, and Groovy

Arrow left icon
Product type Book
Published in Jun 2017
Publisher Packt
ISBN-13 9781787127944
Pages 450 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Vincent van der Leun Vincent van der Leun
Author Profile Icon Vincent van der Leun
Vincent van der Leun
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Java Virtual Machine FREE CHAPTER 2. Developing on the Java Virtual Machine 3. Java 4. Java Programming 5. Scala 6. Scala Programming 7. Clojure 8. Clojure Programming 9. Kotlin 10. Kotlin Programming 11. Groovy 12. Groovy Programming 13. Other JVM languages 14. Quiz Answers

Class organization with packages


All JVM languages define their own syntaxes for creating classes and instantiating objects, but in the end, they produce class files that would run on the JVM. In order to be able to run on the JVM and be able to offer interoperability with classes written in other languages on the JVM platform, they have to follow JVM's requirements for organizing classes. We'll discuss the following topics:

  • Packages
  • Choosing a package
  • Package examples
  • Fully qualified class names

Note

Knowledge of packages is required to understand the organization of the Java Class Library and how to run JVM applications on the command line. Both these topics are discussed in this chapter.

What are packages?

Most languages covered in this book support grouping classes in packages. Classes that are grouped inside a package form a unique namespace. This is the fundamental feature of a JVM. Some languages cannot group classes in a package themselves, but they still support referencing classes inside...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime