Indeed you can. For instance some do not realize a www. url is an actual sub-domain. So it is happening all the time.
You can go to your server settings and choose your sub-domain as the main domain name or add some code to create a redirect.
Many people use Apache servers for hosting websites and when you have used a domain name with traffic to it, a good idea is to use a 301 redirect in the .htaccess file located in the root folder of your website. The purpose is you are telling search engines, bookmarks etc, that hey we are the same and we moved here. That's the short version.
You would add some code like this to the htaccess file.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://subdomain.example.com/$1 [L,R=301,NC]