From the website
WWW.Navy.com:
"Officer Qualifications
Navy Officers must exhibit high moral standards and strong academic performance. See if you meet these basic Navy Officer recruiting requirements. If you’re qualified to enter one of the Officer training programs, check out the next steps to take. Questions? Talk to a Navy recruiter.
Age
You must be no older than 35 but at least 19 years old depending on the program desired (waivers may be granted for positions in high demand).
Citizenship
You must be a U.S. citizen.
If you’re a non-citizen*, you may join the Navy if you entered the United States on a permanent residence visa or have an Alien Registration Green Card and have 1) established a bona fide residence, and 2) established a home of record in the United States.
*To verify your eligibility to be commissioned, contact a recruiter.
Family
If you are a single parent, please contact a recruiter for details on how you can join the Navy.
Also, the Navy will normally not allow you to join if you have more than two dependents under the age of 18. Need more details? Contact a recruiter.
Financial Obligations
In certain cases, you must prove that you can meet your current financial obligations.
Education
To become an Officer in the U.S. Navy, you must have received a four-year BS or BA degree from an accredited university and have strong grades. For specifics, contact a recruiter.
Drug/Alcohol Policy
The Navy has a zero tolerance drug/alcohol policy. Early in the commissioning process, you will take two urinalysis tests. You’ll also be asked questions about prior drug and alcohol use. Answer honestly. If you have questions, contact a recruiter.
Medical/Legal/Moral Standards
The Navy also applies medical, legal and character standards to your application, including traffic offense history, criminal history, citizenship status and more. For more information, contact a recruiter.
Service Commitment
The amount of time you are required to serve depends upon many factors, including your interests, your background, your pursuit of an Officer or Enlisted position, or whether you are taking advantage of Navy education opportunities.
In general:
Enlisted positions typically require an initial service commitment of two to four years (positions involving longer-term training may involve longer service obligations).
Officer positions typically require an initial service commitment of three to five years (again positions involving longer-term training may involve longer service obligations).
The best way to confirm the specific service commitment that will apply to you is to contact a recruiter."