logo

Crowdly

Soit la classe Statique1 : public class Statique1 { private static int a...

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

Soit la classe Statique1 :

public class Statique1 {

private static int a = 0;

private int b;

public Statique1(int valB) {

a++;

this.b = valB;

}

public static int getA() {

return a;

}

public int getB() {

return this.b;

}

public static void main(String[] args) {

Statique1 s1 = new Statique1(1);

Statique1 s2 = new Statique1(2);

System.out.println("valeur 1 = " + Statique1.getA());

System.out.println("valeur 2 = " + s2.getB());

}

}

Compléter les valeurs affichées...

More questions like this

Want instant access to all verified answers on moodle.univ-lr.fr?

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