logo

Crowdly

Browser

Add to Chrome

Millised read väljastatakse ekraanile? public class A {    protected int a;...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Millised read väljastatakse ekraanile?

public class A {

   protected int a;

   A(int a){

       this.a = a;

   }

   void meetoda(){

       System.out.println("Olen A isend, a = " + a);

   }

}

public class B extends A {

   private int b;

   B(int a, int b){

       super(a);

       this.b = b;

   }

   void meetoda(){

       System.out.println("Olen B isend, a = " + a);

       meetodb();

   }

   void meetodb(){

       System.out.println("Olen B isend, b = " + b);

   }

}

public class TestAB {

   public static void main(String[] args) {

       A ab = new B(12, 45);

       ab.meetoda();

   }

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.ut.ee?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome