Skip to content

Commit 4a3f85c

Browse files
authored
Father is greater than I
You heard how I told you, 'I go away, and I come to you.' If you loved me, you would have rejoiced, because I said 'I am going to my Father;' for the Father is greater than I. (John 14:28)
1 parent 83ce1bf commit 4a3f85c

1 file changed

Lines changed: 97 additions & 0 deletions

File tree

task15/task1506/Solution.java

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
package com.javarush.task.task15.task1506;
2+
3+
//You heard how I told you, 'I go away, and I come to you.' If you loved me, you would have rejoiced,
4+
//because I said 'I am going to my Father;' for the Father is greater than I. (John 14:28)
5+
6+
/*
7+
Что-то лишнее
8+
*/
9+
10+
public class Solution {
11+
public static void main(String[] args) {
12+
print((short) 1);
13+
print((Number) 1);
14+
print(1);
15+
print((Integer) 1);
16+
print((int) 1);
17+
}
18+
19+
public static void print(Integer i) {
20+
System.out.println("Это Integer");
21+
}
22+
23+
public static void print(Object i) {
24+
System.out.println("Это Object");
25+
}
26+
27+
public static void print(double i) {
28+
System.out.println("Это double");
29+
}
30+
}
31+
32+
33+
34+
35+
/*
36+
Что-то лишнее
37+
1. Программа должна выводить следующее:
38+
Это double
39+
Это Object
40+
Это double
41+
Это Integer
42+
Это double
43+
44+
2. Удали реализации всех лишних методов
45+
46+
47+
Требования:
48+
1. В классе Solution должен остаться метод print с одним параметром типа Integer.
49+
2. В классе Solution должен остаться метод print с одним параметром типа Object.
50+
3. В классе Solution должен остаться метод print с одним параметром типа double.
51+
4. Вывод на экран должен соответствовать условию.
52+
53+
package com.javarush.task.task15.task1506;
54+
55+
*
56+
Что-то лишнее
57+
*
58+
59+
public class Solution {
60+
public static void main(String[] args) {
61+
print((short) 1);
62+
print((Number) 1);
63+
print(1);
64+
print((Integer) 1);
65+
print((int) 1);
66+
}
67+
68+
public static void print(Integer i) {
69+
System.out.println("Это Integer");
70+
}
71+
72+
public static void print(int i) {
73+
System.out.println("Это Integer");
74+
}
75+
76+
public static void print(Short i) {
77+
System.out.println("Это Object");
78+
}
79+
80+
public static void print(Object i) {
81+
System.out.println("Это Object");
82+
}
83+
84+
public static void print(double i) {
85+
System.out.println("Это double");
86+
}
87+
88+
public static void print(Double i) {
89+
System.out.println("Это double");
90+
}
91+
92+
public static void print(float i) {
93+
System.out.println("Это Double");
94+
}
95+
}
96+
97+
*/

0 commit comments

Comments
 (0)