Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6570709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:47:23+00:00 2026-05-25T14:47:23+00:00

The convention for packages is your domain name. Dashes are sometimes not allowed in

  • 0

The convention for packages is your domain name. Dashes are sometimes not allowed in package names. So if your domain name has a dash what should you use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:47:24+00:00Added an answer on May 25, 2026 at 2:47 pm

    The “official” convention in Java is to replace it with an underscore.

    From (an older version of) the spec:

    In some cases, the internet domain name may not be a valid package
    name. Here are some suggested conventions for dealing with these
    situations:

    If the domain name contains a hyphen, or any other special character
    not allowed in an identifier (§3.8), convert it into an underscore. If
    any of the resulting package name components are keywords (§3.9) then
    append underscore to them. If any of the resulting package name
    components start with a digit, or any other character that is not
    allowed as an initial character of an identifier, have an underscore
    prefixed to the component.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The standard way to avoid package name conflicts in Java is to use reverse-domain
I'm already familiar with the standard Java package naming convention of using a domain
The standard naming convention in the Java world is to name packages, classes and
Is including a application package prefix while defining a custom action string is convention
What are some good package naming conventions for domain specific object models. For example,
By convention our DB only alows the use of stored procedures for INSERT, UPDATE
The convention with using JavaMail seems to be: -- Use smtp for sending emails
Our software is not ever officially installed on Windows, and currently has an update
I have a python project with the following structure: Clustering (project name) clustering (package)
I have an SSIS package that does the following: Selects the connection strings from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.