The Oracle of Omaha can't get enough of stocks that have solid records of compounding in value year after year, and it isn't too surprising why. Owning shares of reliably growing businesses means getting the advantage of their success for as long as you're willing to hold them.

Two companies in the Berkshire Hathaway portfolio that fit that description and are worth buying hand over fist today are Johnson & Johnson (JNJ -1.15%) and Apple (AAPL 0.52%) -- especially if you can hold them for the many decades that Warren Buffett would.

1. Johnson & Johnson

Johnson & Johnson is a relatively minor Berkshire holding, but it's a great example of some elements of Buffett's investing style. The healthcare company owns leading consumer health brands for products that people use every day such as Band-Aids and Tylenol. Those products brought in $15 billion in 2022, and they provide recurring revenue that doesn't require much in the way of marketing or research and development spending to maintain. And Buffett loves brands with staying power because they provide an economic moat that protects a business' market share -- not to mention his affection for low-cost revenue streams in general.

J&J also has pharmaceutical and medical-devices businesses, both of which provide higher growth than its consumer health segment. And since it plans to spin off its consumer health segment into a new company in 2023, those two segments will carry the Johnson & Johnson banner forward. But investors who buy shares now and hold them will wind up with shares of both post-split entities, and exposure to the slow-burning growth of the consumer health business as well as the peppier growth of the other two segments. 

Holding the shares for a long time has a particular advantage with J&J that will almost certainly continue after the spinoff. Management has a decades-long streak of hiking the dividend each year. At the current share price, it has a forward yield of more than 2.8%. Reliable dividend increases signal to investors that a business has staying power in the form of stable cash flows that management is confident will grow over the long term. And the longer you're willing to retain your shares, the higher your return will be, so J&J is suitable for either a lump-sum investment or a dollar-cost averaging (DCA) strategy, depending on your preferences. 

2. Apple

Apple is a business that almost everyone's familiar with, and it's also the single largest holding in Buffett's portfolio. The tech company's brand power is perhaps unmatched globally, as evidenced by the enduring appeal of its iPhones and MacBook computers, which helps explain why it's a Buffett favorite. People will keep coming back for new iPhones every few years, and in the meantime, Apple can sell the customers in its ecosystem all manner of add-ons in the form of cloud subscription services, software via its app store, and pricey accessories like AirPods. The company's trailing-12-month net income was $95.2 billion, which is nothing to sneeze at, to say the least.

And Apple doesn't need to reinvent the wheel to capture recurring hardware sales. It only needs to provide incremental improvements in the performance of the underlying technology. That helps it avoid getting caught up in an R&D spending race to grab or retain market share. Likewise, Apple's recent foray into processing payments and sending money via Apple Pay means that it will have plenty of additional revenue from fees for the foreseeable future, and it won't have to spend much more to capture that revenue either. Per his views on the value of economic moats, the ability to make low-effort sales is likely quite good in Buffett's view. This business has plenty of opportunities for both, regardless of how its share price fluctuates from day to day. 

Furthermore, Apple's shareholder-friendly policies are unparalleled. Between its ever-rising dividend that currently yields about 0.6% and its legendary share buybacks, the longer you hold your shares, the more money you'll get back. In total, Apple has distributed $573.3 billion in capital via share repurchases alone since 2012, and that total only rises every quarter. Finally, while its valuation isn't cheap, its price-to-earnings ratio of 26 isn't too expensive, either, so it's probable that the company meets Buffett's general rule of paying a fair price for a great stock.