Skip to content

Commit ceae168

Browse files
authored
he saw and believed
So then the other disciple who came first to the tomb also entered in, and he saw and believed. (John 20:8)
1 parent 6f86ca1 commit ceae168

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
//So then the other disciple who came first to the tomb also entered in, and he saw and believed. (John 20:8)
3+
4+
package com.javarush.task.task23.task2301;
5+
6+
/*
7+
Запрети наследование
8+
*/
9+
public class Solution {
10+
11+
public static final class Listener {
12+
public void onMouseDown(int x, int y) {
13+
//do something on mouse down event
14+
}
15+
16+
public void onMouseUp(int x, int y) {
17+
//do something on mouse up event
18+
}
19+
}
20+
21+
public static void main(String[] args) {
22+
23+
}
24+
}
25+
/*
26+
Запрети наследование
27+
Запрети наследование от класса Listener.
28+
29+
30+
Требования:
31+
1. Класс Listener должен быть создан внутри класса Solution.
32+
2. Класс Listener должен быть публичным.
33+
3. Класс Listener должен быть статическим.
34+
4. Должна быть запрещена возможность стать потомком класса Listener.
35+
36+
package com.javarush.task.task23.task2301;
37+
38+
*
39+
Запрети наследование
40+
*
41+
public class Solution {
42+
43+
public static class Listener {
44+
public void onMouseDown(int x, int y) {
45+
//do something on mouse down event
46+
}
47+
48+
public void onMouseUp(int x, int y) {
49+
//do something on mouse up event
50+
}
51+
}
52+
53+
public static void main(String[] args) {
54+
55+
}
56+
}
57+
*/

0 commit comments

Comments
 (0)