Skip to content

Commit 9abbbab

Browse files
authored
Add files via upload
1 parent fa1f1be commit 9abbbab

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: Methods/NullErrorSolution.java

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Test {
2+
void nullError(String name) {
3+
System.out.println("name:" + name);
4+
}
5+
6+
void nullError(Integer i) {
7+
System.out.println("integer:" + i);
8+
}
9+
}
10+
11+
class NullErrorSolution {
12+
public static void main(String[] args) {
13+
Test obj = new Test();
14+
String arg=null;
15+
obj.nullError(arg);
16+
}
17+
18+
}

0 commit comments

Comments
 (0)