On Wednesday's "Mad Money" show, Jim Cramer said that every problem has a solution, including the problem of how to invest in banks. He recommended investing in the strongest banks, such as JPMorgan (JPM - Get Report) and Goldman Sachs (GS - Get Report), both of which he owns for his Action Alerts PLUS charitable trust.

On Thursday, JPMorgan added $1.37, or 4%, to close at $35.35, and Goldman rose $7.32, or 5.2%, to $149.47.

As for worries about rising gas prices, Cramer recommended Transocean ( RIG - Get Report), Occidental ( OXY - Get Report) and Schlumberger ( SLB - Get Report).

On Thursday, Transocean closed up $2.32, or 2.9%, at $82.19; Occidental closed up $1.75, or 2.6%, at $68.62; and Schlumberger closed up $1.42, or 2.5%, at $58.31.

He also recommended regional bank FirstMerit ( FMER) as a play on low interest rates and homebuyer tax credits.

On Thursday, FirstMerit added 58 cents, or 3.4%, to $17.73.

Last week, Cramer recommended Tessera Technologies ( TSRA) as a speculative tech name, and he said it's time to take profits in the stock. As of "Mad Money" on Wednesday, Tessera was up 34% since Cramer had give it his stamp of approval.

On Thursday, Tessera gave up 37 cents, or 1.4%, to $26.66.

At the time of publication, Cramer was long JPMorgan and Goldman Sachs.

Jim Cramer is a director and co-founder of TheStreet.com. He contributes daily market commentary for TheStreet.com's sites and serves as an adviser to the company's CEO. Outside contributing columnists for TheStreet.com and RealMoney.com, including Cramer, may, from time to time, write about stocks in which they have a position. In such cases, appropriate disclosure is made. To see his personal portfolio and find out what trades Cramer will make before he makes them, sign up for Action Alerts PLUS. Watch Cramer on "Mad Money" weeknights on CNBC. Click here to order Cramer's latest book, "Mad Money: Watch TV, Get Rich," click here to order his book, "Real Money: Sane Investing in an Insane World," click here to get his second book, "You Got Screwed!" and click here to order Cramer's autobiography, "Confessions of a Street Addict." While he cannot provide personalized investment advice or recommendations, he invites you to send comments on his column by clicking here.

TheStreet.com has a revenue-sharing relationship with Traders' Library under which it receives a portion of the revenue from Traders' Library purchases by customers directed there from TheStreet.com.