Yes and no. Google will rank it using the same rules as any other website unless it has the same (or close) content to 'www.'. So if you want to create domain to test different page contents - forget about this, Google tracks this. If you want to make a completely different website on www2, then better call it according to your primary keyword, e.g.: if your website is about animals, and you want to make a special part about dogs, then 'dogs.example.com' is Google-friendly.