Repaying a student loan means you do have some credit, but getting a credit card is also a good idea if you are looking to either improve your credit score or better establish your credit rating.
According to Fair Isaac, the company that created the FICO credit score, 10 percent of your credit score is based on the mix of credit that is shown in your credit reports.
Generally speaking, it's better for your credit rating to show various types of credit. Right now, you only have one form of credit - a student loan - in your credit reports. A student loan is categorized by the credit-scoring world as "installment" debt.
By contrast, a credit card is deemed to be "revolving" debt. So applying for a credit card, and then paying it faithfully on time every month, will show credit-scoring companies that you can responsibly juggle multiple forms of credit. If you do pay that credit card bill on time, the result will be a higher credit score.
Besides your credit score, there's another reason to consider getting a credit card. If you add a credit card to your credit profile, you also deepen your credit experience and give creditors a chance to better evaluate your overall payment track record.
Because a credit card can be used with much greater frequency than other loans, lenders and credit scoring agencies place a lot of emphasis on how credit cards are managed. Ideally, you'd want to only charge as much as you can pay off every month. But even if you do have some periods where you aren't able to pay your credit card balance in full, at least make sure that you pay your minimum payment on time.
Ultimately, handling a credit card wisely can also help you gear up and qualify for larger loans, such as a car loan or mortgage.