Yes, many things are wrong, but major wrong thing is that nothing is clear. Next time, try to create a very short but complete code sample for the sole purpose of addressing a particular isolated problem and asking a question (but in many cases it will help you to find the solution by yourself).
Let's see:
The method
calculate
accepts two strings which are not used in its code. Why would you need those two parameters? Now, you don't show where
CountNoOfInstallment, NoOfInstallment, InstallmentAmount, FinalAmount
come from? Not from parameters. They must come from some external context; they could be the members of declaring class. Why showing this code if you don't show their declaration.
But the main problem is: you do not return anything (it should not compile). You see, you instantiate
Sol
(do yourself a big favor, never use abbreviations in variable names), add four elements and just return nothing. The result of this operation will be lost and eventually garbage-collected because you simply leave it
unreachable (
http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Reachability_of_an_object[
^]). Return the instance of the list you create. That's it.
—SA