Last change
on this file was 2, checked in by bird, 22 years ago |
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
392 bytes
|
Line | |
---|
1 | // Test of failing method invocation.
|
---|
2 |
|
---|
3 | public class Invoke_1
|
---|
4 | {
|
---|
5 | public void call_me ()
|
---|
6 | {
|
---|
7 | System.out.println ("no");
|
---|
8 | }
|
---|
9 |
|
---|
10 | public static Invoke_1 get_i ()
|
---|
11 | {
|
---|
12 | return null;
|
---|
13 | }
|
---|
14 |
|
---|
15 | public static void main (String[] args)
|
---|
16 | {
|
---|
17 | Invoke_1 i = get_i ();
|
---|
18 | try
|
---|
19 | {
|
---|
20 | i.call_me ();
|
---|
21 | }
|
---|
22 | catch (NullPointerException ok)
|
---|
23 | {
|
---|
24 | System.out.println ("ok");
|
---|
25 | }
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.