Quelles sont les variables d'instances (= attributs) de cette classe?
Created
September 28, 2023 11:59
-
-
Save nherbaut/fdb9ddd5d9358d028804d70156cba760 to your computer and use it in GitHub Desktop.
L2.2.14 Exo classes type et for
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Thing { | |
| private int a; | |
| public Thing(int x) { | |
| a = x; | |
| } | |
| public int geta() { | |
| return a; | |
| } | |
| public void print() { | |
| int b = 4;System.out.println(geta() + " " + b); | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
execute me on https://java.miage.dev/?gistId=fdb9ddd5d9358d028804d70156cba760