About Question enthuware.ocajp.i.v7.2 . 1112 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
killesk
Posts: 1
Joined: Thu Feb 12, 2015 5:42 pm
Contact:

About Question enthuware.ocajp.i.v7.2 . 1112 :

Post by killesk »

When I comment out the line:
// catch (NewException e){}


I get the error message relating to the static method m2:
No enclosing instance of type Question_0001 is accessible. Must qualify the allocation with an enclosing instance of type Question_0001 (e.g. x.new A() where x is an instance of Question_0001).

Could someone explain to me please why I'm getting that error reference?

Is it because it's a static method and I'm trying to instantiate an object?

-Kind regards,
Killesk

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1112 :

Post by admin »

Please post the exact code that you are trying to compile. It looks like a case of missing or extra bracket.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests