logo

Crowdly

Browser

Add to Chrome

(éléments de classe vs instance) Soit la classe MaClasse suivante. public clas...

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

(éléments de classe vs instance) Soit la classe MaClasse suivante.

public class MaClasse{

    private static final int ent1=1;

    private static int ent2;

    private final int ent3;

    

    public MaClasse(int i){

        ent3=i;

    }

    

  

    public static int foo(){return ent3;}

    public int bar(int i){ent2=ent3+ent2;return ent1;}

    public void m(int i){ent2=ent2+i;}

    public void m2(){ent1=ent1++;}

    

}
100%
0%
0%
100%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.umontpellier.fr?

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

Browser

Add to Chrome