Igor Nadj
Igor Nadj

Reputation: 324

Package naming convention

The typical case is that a package is prepended with a url, to prevent conflicts.

E.g. com.example.helloworld

What do you do with a multi-part TLD, e.g. co.nz?

  1. co.nz.example.helloworld, or
  2. nz.co.example.helloworld

Thoughts?

Upvotes: 4

Views: 282

Answers (1)

JB Nizet
JB Nizet

Reputation: 692121

The convention is to write the domain name backwards, so it should be

nz.co.example.helloworld

This is explained in the Java tutorial.

Upvotes: 8

Related Questions