With careful planning, you can graduate two years after transferring to UC. The key is taking courses that are acceptable for transfer and meet minimum, major and general education requirements.
California community college has an agreement with UC. It's called a transfer
course agreement (TCA). The TCA specifies which of its courses receive UC
Plus, your community college and the UC campus you wish to attend may have additional agreements that specify which transferable courses may be used to meet various college (general education or breadth) and major requirements.
Limits on transfer credits
UC awards up to 70 semester (105 quarter) units of credit for lower-division coursework completed at any institution or any combination of institutions.
See UC's Statement of Transfer Practices [PDF] for more information on transfer credit limitation.
Active-duty or veterans of the U.S. military who have completed courses provided by the military (not courses completed at a collegiate institution) should inform UC on the admission application. Students should be prepared to submit official military transcript (e.g. SMART, AARTS, etc.) after enrollment at UC.
UC may award transfer credit for some of your military courses if the content was equivalent to a course taught at the University.