About Question enthuware.ocajp.i.v7.2.1063 :

Moderator: admin

Post Reply
rekoch
Posts: 2
Joined: Mon Mar 07, 2016 4:55 am
Contact:

About Question enthuware.ocajp.i.v7.2.1063 :

Post by rekoch » Mon Mar 07, 2016 4:59 am

Hi there

I guess there is a small typo in this question. The example ist based on the image above. On the image the class-name is "Stock.class". But in the question itself, there is "class StockQuote".

Best regards
Andreas

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

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

Post by admin » Mon Mar 07, 2016 10:36 am

That is because there are two different classes - Stock.class is present in the location given in the picture and StockQuote is yet to be compiled (as per the question) and so is not shown in the the picture.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

rekoch
Posts: 2
Joined: Mon Mar 07, 2016 4:55 am
Contact:

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

Post by rekoch » Mon Mar 07, 2016 12:36 pm

Thanks for the quick answer. That was not so clear for me when I made the test. Now its clear.

Hissam
Posts: 3
Joined: Fri Sep 09, 2016 10:57 pm
Contact:

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

Post by Hissam » Sun Sep 11, 2016 1:16 am

MY bad

SeoaneR
Posts: 7
Joined: Tue Nov 07, 2017 8:23 am
Contact:

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

Post by SeoaneR » Mon Apr 16, 2018 2:00 pm

when I type the method with the throws IOException i get a compilation error stating" cannot find symbol" but as
soon as I type import java.io the compilation error is no longer there.
One of the options given as a potential answer is :
It is not required to import java.io.* or import java.io.IOException because java.io package is imported automatically.
Why do I get a Compilation Error if the above statement says that it is automatically imported

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

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

Post by admin » Mon Apr 16, 2018 8:27 pm

That is an incorrect option. You do need import java.io.* or import java.io.IOException if you are using IOException in your code.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

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