Biggest doubt ever in Java -- 1.why do we need abstract methods?
(I know, it is written in the "There are no dumb questions", but I don't get them. Why do I need abstract methods for polymorphism?2.what is "implementation"?

1. can you do without them, sure ...
can you write polymorphic code without them .. sure.
but
let's say you have a class car.
and you want to divide that in (say:) a sportscar, a familycar, ...
all of these will have different implementations of:
shiftUp() or speedUp()
since that all depends on the engine. but they are all cars.
so, you could write a normal car class, but since there is no 'default' speedUp..

you can also make it abstract.

an abstract class is a bit like an interface. it tells you WHICH methods to implement, not HOW to implement them.
but, you can see every object as
Car b = new SportsCar();...
so you can store them in an ArrayList<Car>

2. you have inheritance (Class A extends B)
and you have implementing of classes, like interfaces
inheritance gives you complete code which you can reuse
implementation tells you: (at least) these methods should be implemented in your class, even if it's just a mock method.

I'll try to explain this with an example. Let's talk about a simple templating system which is based on a single Template interface. Every different template implementation has a different way of interpolating variables, convention used for representing data etc. But all templates also share a common piece of logic: they all interact with the "environment" i.e. state, they all are capable of being serialized to common formats like PDF, PS etc.

My concern as a template framework provider would be to prevent code/effort duplication for template implementers i.e. classes which provide different template support. To that end, I create a convinience base class which would be extended by all template implementers and which has the common logic required for all templates. But I have two problems:

I can't enforce template writers to override/implement a method. For e.g. I would want each template writer to override the render() method which takes a template, environment and produces a rendered output as String.

I can't prevent instantiation of the BaseTemplate class.

These two problems can't be easily handed by a normal class. Enter abstract classes. You want to enforce template implementers to override a given method? No problem, just make it abstract. You want to enforce non-instantiation? No problem, make the entire class abstract.

Of course, I'll also mention that you can't have abstract methods without making the entire class abstract because as per common sense, you'll really not want to "instantiate" something which isn't complete (yes, abstract classes can be thought of as "imcomplete" classes).

Fair enough. To understand the need for a solution, you need to first have a good grasp on the problem you are trying to solve. So my question to you is: what would be your solution if you are asked to come up with a way to ensure that clients are forced to implement a subset of methods found in an interface? E.g.

Let's say renderToImage() is a convenience method which uses renderToString() to output the image. If I have to create a class which only needs to implement renderToString(), what would be your solution?