After the revolutions of 1848 and the rise of ethnic nationalism, nervousness about ethnic tensions in Austria-Hungary resulted in a prevailing equality between Czechs and German Bohemians. Each ethnicity tried to retain, in regions in which it was the majority, sovereignty over its own affairs. Czechs and Germans generally maintained separate schools, churches and public institutions. Nevertheless, despite the separation, Germans often understood some Czech, and Czechs often spoke some German. Cities like Prague, however, saw more mixing between the ethnicities and also had large populations of Jews; Germans who live with Czechs fluently spoke Czech and code-switched between German and Czech when talking to Czechs and other Germans. Jews in Bohemia often spoke German and sometimes Yiddish. The famed writer Franz Kafka exemplifies the diversity of Bohemia since he was a Prague-based German-speaking Jew, but his surname was of Czech origin.