Skip to content

Commit b78daea

Browse files
authored
part with me
Peter said to him, "You will never wash my feet!" Jesus answered him, "If I don't wash you, you have no part with me." (John 13:8)
1 parent 44d20a2 commit b78daea

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎task12/task1201/Solution.java‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.javarush.task.task12.task1201;
2+
3+
//Peter said to him, "You will never wash my feet!" Jesus answered him, "If I don't wash you, you have no part with me." (John 13:8)
4+
5+
/*
6+
Киты и коровы
7+
*/
8+
9+
public class Solution {
10+
public static void main(String[] args) {
11+
Cow cow = new Whale();
12+
13+
System.out.println(cow.getName());
14+
}
15+
16+
public static class Cow {
17+
public String getName() {
18+
return "Я - корова";
19+
}
20+
}
21+
22+
public static class Whale extends Cow {
23+
public String getName() {
24+
return "Я не корова, Я - кит.";
25+
}
26+
27+
}
28+
}

0 commit comments

Comments
 (0)