Both a former prosecutor & public defender
Justices are selected and re-selected in nonpartisan elections to serve eight-year terms. Interim selections to fill vacancies that occur between elections are made by governor appointment, which is informed but not bound by recommendations from a government-appointed judicial nominating commission.
Selection method sources:
Ballotpedia, Judicial Election Methods By State; Brennan Center for Justice, Judicial Selection: An Interactive Map