Can I create a class inside a method,could anyone Explain me with a simple example ?

You could not create a new class inside a method.
You can implement an abstract class or an interface inside a method.

what exactly would be the purpose of creating a class inside of a method, exactly? @o@

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.