File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
1-0-java-basics/1-3-0-hello-generics Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,17 @@ You're supposed to be familiar **Java classes** and **casting**
15
15
* change the ** getter return type** to parametrized type ✅
16
16
* refactor ` BoxDemoApp ` to specify generic type as ` Integer ` and receive ** compile time error** ✅
17
17
18
-
19
- ---
18
+ ##
20
19
21
20
In many cases the logic we implement does not depend on the data type. In other words, ** many algorithms are the same
22
21
regardless if you apply them to Integer, String or any other types.** So in order to leverage the same logic for different
23
22
types we need some form of type parametrization. Of course, we can use ` Object ` and store anything we want, but
24
23
it is not safe. Using ` Object ` requires runtime casting which can cause runtime exceptions.
25
24
26
- ---
25
+ ##
27
26
28
27
#### 🆕 First time here? – [ See Introduction] ( https://github.com/bobocode-projects/java-fundamentals-course/tree/main/0-0-intro#introduction )
29
- #### ➡️ Have any feedback? – [ Please fill the form ] ( https://forms.gle/Q5aEmF8E86fbZ4rXA )
28
+ #### ➡️ Have any feedback? – [ Please fill the form ] ( https://forms.gle/Q5aEmF8E86fbZ4rXA )
29
+
30
+ ##
31
+ <div align =" center " ><img src =" https://raw.githubusercontent.com/bobocode-projects/resources/master/animation/GitHub%20Star_3.gif " height =50/ ></div >
You can’t perform that action at this time.
0 commit comments