Computer Science, asked by sravanthisingam3, 10 months ago

class A{
public void m10)
{ System.out.println("A"); }
public class B extends A
void m10
{ System.out.println("B"); }
public static void main(String []args)
A a = new B();
a.m10):​

Answers

Answered by sanjithvarun
6

Answer:

In java language, i have solved the syntax errors but not changed any logic of the code:

Explanation:

public class one

       {

       public void m10()

           {

               System.out.println("A");

           }  

       }    

class B extends one

{

   void m20()

       { System.out.println("B");  

       }

   public static void main(String []args)

   {

       B a = new B();

         a.m10();

         a.m20();

   }

}

Similar questions