Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Clojure for Java Developers

You're reading from  Clojure for Java Developers

Product type Book
Published in Feb 2016
Publisher
ISBN-13 9781785281501
Pages 156 pages
Edition 1st Edition
Languages

Namespaces in Clojure


Clojure namespaces might be familiar to you, as a Java developer, and for a very good reason, they have a very deep relationship with Java's packages and the classpath.

First of all, let's review what we already know from Java.

Packages in Clojure

The Java code is organized in packages, a package in Java is a namespace that allows you to group a set of similar classes and interfaces.

You can think of a package as something very similar to a folder in your computer.

The following are some common packages that you use a lot when programming in Java:

  • java.lang: Everything that's native to Java, including basic types (integer, long, byte, boolean, character, string, number, short, float, void, and class), the basic threading primitives (runnable, thread), the basic primitives for exceptions (throwable, error, exception), the basic exceptions and errors (NoSuchMethodError, OutOfMemoryError, StackOverflowError, and so on) and runtime access classes like runtime and system.

  • java...

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 $15.99/month. Cancel anytime}