Correct the given code
class Fruit
{
    string name;
    string color;
class Apple extends Fruit
{
    public Apple(string name, string color ) 
    {
         this.name=name;
         this.color=color;
     } 
class Driver 
{
    public static void main(String [] args);
    {
         apple  a= New apple("apple ", "red "):
          system.out.printl(a.name);
   } 
}      

Posted on by