Perhaps you've heard the bridge maxim "eight ever, nine never"? That refers to the situation where you have an eight or nine card suit fit and are looking to pick up the Queen. It says you should finesse with eight, or play for the drop with nine.
However with nine the difference in the odds is small. If you have reason to believe one opponent has a long suit then it's better to play that person for a singleton. Other factors can also come into play; consider this deal where you are declarer in 6♥ and a spade is led.
♠ KQ72
♥ AJ3
♦ 84
♣ A954
♠ A
♥ K109542
♦ A2
♣ K1062
If you don't pick up the ♥Q then your next reasonable chance is to throw two clubs on dummy's spades, ruff a third round of clubs and then throw your diamond loser on the last club.
However if you've played for the ♥Q to drop and it didn't, then you'll have no entry to dummy at the end to cash the club. If you've finessed the second round of hearts and lost, then hearts were 2-2 and you can get to dummy with a trump. Finessing is the right plan.
You can cash either the Ace or King first and then finesse, but starting with the Ace caters to the possibility that RHO has all four hearts.
Also be careful to preserve your ♥2. That way you can impress everybody by entering dummy later with the 3.
Nine Ever
Re: Nine Ever
I said the difference in the odds is small. This will make that more clear. Below are all the possible heart holdings that LHO might have, and all are roughly equally probable*.
"Plan A" means playing for the drop; you intend to lead your 4 to the Ace and then dummy's 3 to the King. Of course if LHO shows out on the first play then you will run the Jack instead.
"Plan B" means finessing; you intend to lead your 4 to the Ace and then run the Jack, playing your 5 from hand if it's not covered.
In the table Yes means you will pick up the Queen, No means you will not.
__________
* You may have to take my word for this, as proving it is quite difficult.
"Plan A" means playing for the drop; you intend to lead your 4 to the Ace and then dummy's 3 to the King. Of course if LHO shows out on the first play then you will run the Jack instead.
"Plan B" means finessing; you intend to lead your 4 to the Ace and then run the Jack, playing your 5 from hand if it's not covered.
In the table Yes means you will pick up the Queen, No means you will not.
Plan A Plan B Void Yes Yes Q Yes Yes 8 No Yes 7 No Yes 6 No Yes Q8 Yes No Q7 Yes No Q6 Yes No 87 Yes Yes 86 Yes Yes 76 Yes Yes Q87 No No Q86 No No Q76 No No 876 Yes Yes Q876 No No Count 9 9As you can see each plan works in 9 of the 16 possible combinations.
__________
* You may have to take my word for this, as proving it is quite difficult.