File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/test/java/com/example Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .example ;
2
+
3
+ class Cliente {
4
+ double renda ;
5
+ char sexo ;
6
+ int anoNascimento ;
7
+ }
8
+
9
+ public class Classes {
10
+
11
+ public static void main (String [] args ) {
12
+ System .out .println ("Criando classes" );
13
+ Cliente cliente = new Cliente ();
14
+ cliente .renda = 1000 ;
15
+ cliente .sexo = 'M' ;
16
+ cliente .anoNascimento = 1980 ;
17
+ System .out .println ("Renda: " + cliente .renda );
18
+ System .out .println ("Sexo: " + cliente .sexo );
19
+ System .out .println ("Ano de nascimento: " + cliente .anoNascimento );
20
+
21
+ Cliente cliente2 = new Cliente ();
22
+ cliente2 .renda = 2000 ;
23
+ cliente2 .sexo = 'F' ;
24
+ cliente2 .anoNascimento = 1970 ;
25
+
26
+ System .out .println ("Renda: " + cliente2 .renda );
27
+ System .out .println ("Sexo: " + cliente2 .sexo );
28
+ System .out .println ("Ano de nascimento: " + cliente2 .anoNascimento );
29
+
30
+ }
31
+
32
+ }
You can’t perform that action at this time.
0 commit comments