California is known for a lot of things, including sunshine, beaches and Hollywood, but it is also home to seven of the 10 wealthiest cities in the U.S., according to U.S. News & World Report. However, it's not because of movie stars and movie producers.

Instead, technology companies are the main contributor to the state's wealth. In fact, all seven of the California cities are located either near or in the heart of Silicon Valley, a region with multiple tech firms.

Other cities on the top 10 list also relied on technology firms to some extent, but also derived economic strength from other industries, such as large universities, hospitals and prisons, according to the report.

The ranking was based on U.S. Census Bureau data, which has found a widening gap between earners in the 90th percentile, whoc make an average of $211.956, and those in the 10th percentile, whose annual earnings average $15,660.

"In each of the 10 wealthiest places included in Census Bureau figures—many of which are suburbs of larger cities across California and the West Coast—the average household income lies between the nation’s 80th and 90th percentiles, with average earnings above $150,000 per year," the report stated.

The following are the wealthiest cities in the country by median household income, according to U.S. News & World Report:

10. Fremont, Calif. 
This eastern Bay Area city is near several Silicon Valley businesses. With a median household income of $155,968, the city boasts a population of about 230,504, according to census. The city is the fourth largest in the San Francisco Bay area, according to the city’s website. Almost 70% of the city's residents have a household income greater than $100,000, the census said.