His statement "The end justifies the means" couldn't be more true in the real world.

How can you judge the appropriateness of the means except by the end they are to achieve, because in the real world practically any means to achieve any end will also do harm one way or another.

This statement is, however, most often applied to justify inappropriate means to an end best left unachieved.

Now The Prince was basically a job application (he didn't get the job), so he may have neglected to define that part adequately so as not to displease princes, though it's clear he preferred republics over princes.