Biblioteca Java - Blame information for rev 38
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
38 | mihai | 1 | |
2 | public class Telefon { | ||
3 | int pb; | ||
4 | |||
5 | Telefon(){ | ||
6 | pb = 100; | ||
7 | } | ||
8 | |||
9 | Telefon(int pb){ | ||
10 | this.pb = pb; | ||
11 | } | ||
12 | |||
13 | void afiseaza(){ | ||
14 | System.out.println("Telefon baterie "+pb+"%"); | ||
15 | } | ||
16 | |||
17 | public static void main(String[] args) { | ||
18 | Telefon t1 = new Telefon(); | ||
19 | t1.afiseaza(); | ||
20 | |||
21 | /* Telefon t2 = new Telefon(); | ||
22 | t2.afiseaza(); | ||
23 | |||
24 | Telefon t3 = new Telefon(15); | ||
25 | t3.afiseaza();*/ | ||
26 | |||
27 | } | ||
28 | } |