update polymorphism example

This commit is contained in:
Oleksii Aleshchenko
2023-03-02 15:48:38 +02:00
parent 429bcc7b3d
commit f692ae7588
4 changed files with 31 additions and 0 deletions

View File

@@ -22,5 +22,17 @@ public class Main {
/*for (int i = 0; i < engines.length; i++) {
System.out.println(engines[i].getPower());
}*/
// +
int a = 1;
int b = 1;
int c = a + b;
System.out.println(c);
String sA = "1";
String sB = "1";
String sC = sA + sB;
System.out.println(sC);
}
}