close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_fs.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Jul 17, 2009, 2:34:47 PM (16 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v6
|
v7
|
|
53 | 53 | {{{ |
54 | 54 | #!java |
55 | | abstract class Demo { |
| 55 | abstract class AC { |
| 56 | AC(){ } // abstract would have constructor |
56 | 57 | abstract void method1(); |
57 | 58 | abstract void method2(); |
58 | | … |
59 | | } |
| 59 | } |
60 | 60 | |
61 | | interface Demo { |
62 | | void method1(); |
| 61 | interface INF { |
| 62 | // INF(){ } // error : interface cannot have constructor |
| 63 | void method1(); |
63 | 64 | void method2(); |
64 | | … |
65 | | } |
| 65 | } |
| 66 | |
| 67 | public class test { |
| 68 | |
| 69 | public static void main(String[] args) { |
| 70 | |
| 71 | // INF if_err1 = new INF; // error : INF cannot be resolved |
| 72 | // INF if_err2 = new INF(); // error: Cannot instantiate the type INF |
| 73 | INF[] inf = new INF[5]; // declare as array would be work |
| 74 | // AC ac_err1 = new AC; // error : AC cannot be resolved |
| 75 | // AC ac_err2 = new AC(); // even AC have construstor but still error: Cannot instantiate the type AC |
| 76 | AC[] ac = new AC[5]; // declare as array would be work |
| 77 | } |
| 78 | } |
66 | 79 | }}} |
67 | 80 | |