The Continental Army was formed on June 14, 1775, before the establishment of the United States, to meet the demands of the American Revolutionary War. Congress created the United States Army on June 3, 1784 after the end of the American Revolutionary War, to replace the disbanded Continental Army.
The United States Navy can trace its origins to the Continental Navy, which the Continental Congress established during the American Revolutionary War. The United States Constitution, ratified in 1789, empowered Congress "to provide and maintain a navy." Acting on this authority, Congress ordered the construction and manning of six frigates; one of the original six, USS Constitution, familiarly known as "Old Ironsides," survives to this day.
The War Department administered naval affairs from that year until Congress established the Department of the Navy on April 30, 1798.
ETA: info from wikipedia