This repo contains two different sample projects, please see the README in project directory of your choosing for specific set up instructions.
The quickstart project will show you a simple project that initializes the Square Java SDK, and then retrieves the locations for a given access token
The payments project will show you a simple Java project that is integrated with Square's payment api endpoint. Checkout this example to see how to easily take a payment with Square and Java