File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -424,3 +424,32 @@ class Inner {
424424 }
425425}
426426{% endhighlight %}
427+
428+ {% include responsive_ad.html %}
429+
430+ ### Q&A
431+
432+ __ Q1.__
433+
434+ {% highlight java linenos %}
435+ public class HorseTest {
436+ public static void main(String[ ] args) {
437+ class Horse {
438+ public String name;
439+ public Horse(String s) {
440+ name = s;
441+ }
442+ }
443+ Object obj = new Horse("Zippo");
444+ System.out.println(obj.name);
445+ }
446+ }
447+ {% endhighlight %}
448+
449+ What is the result?
450+
451+ A. An exception occurs at runtime at line 10
452+ B. Zippo
453+ C. Compilation fails because of an error on line 3
454+ D. Compilation fails because of an error on line 9
455+ E. Compilation fails because of an error on line 10
You can’t perform that action at this time.
0 commit comments