• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAVA OCA Exam (1Z0-803)

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am pretty new to java (infact i've only been coding in it for aboutr 5 weeks). I recently took the Java OCA Exam and needless to say I did not do so great (thats why i am here!).

I now have another 2 weeks in order to study further before I can resit the exam, so to help me I have purchased the "Oracle Certified Associate, Java SE 7 Programmer Exam (1Z0-803) Complete Video Course" written by Simon Roberts who recommends this website.

I feel as if its just the silly basic things that I am not grasping properly and after doing a quiz on this video tutorial I would like to clarify a few concepts.

So one of the questions provided on the quiz is as follows:



At what point in the above code can you access x.

Now I know the answer that the question is looking for is b because thats within the scope of where the variable is defined but what I dont understand is why because due to the use of "public int" and it being an illegal modifier, this code cannot be compiled, so why is the answer not "it wont compile"?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch
You appear to have copied that code incorrectly; it will not compile as it stands.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That definitely doesn't compile. If it really says "public int" and doesn't have an answer of "does not compile", that's an error in the question/answer.
 
Ben Alderson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have just double checked the code in question and I indeed copied it correctly.

Although the question says "Where is it legal to refer to the variable x" rather than "At what point in the above code can you access x".

Thanks for the clarification though
 
Greenhorn
Posts: 20
3
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That code does not compile simply because all local variables can't have an access modifier.
Why? Because an access modifier is used to set the level of accessibility of a variable (only inside the class, only inside the package, and so on). Now, you can easily realize that since a local variable is accessible only in the method where it's declared, an access modifier would be completely useless. Thus, local variables can't be marked with the access modifier.
 
Ben Alderson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So as i stated at the begining of this topic, I sat the OCA Exam (1Z0-803) recently and did not do very well at all.

Does anybody have any tips for learning the material required to pass this exam? I do have a copy of the book for Java SE 7 Programmer 1 and Programmer 2 (1Z0-803) but find it quite heavy reading and a lot of the information is not required as the exam only covers programmer 1.

I am working through the video tutorials that are written by Simon Roberts which is helping, just wondering if anybody had any other suggestions?
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found that Enthuware is great certificate prep software.  Basically, if you can pass their mock test, you will pass the certificate exam.
 
Author
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, why not take 1Z0-808? It is newer for Java 8
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ben Alderson wrote:Does anybody have any tips for learning the material required to pass this exam? I do have a copy of the book for Java SE 7 Programmer 1 and Programmer 2 (1Z0-803) but find it quite heavy reading and a lot of the information is not required as the exam only covers programmer 1.


Is that Kathy & Bert's book? If so, it is divided into two sections. Making it clear which part is for the OCA.
 
Ben Alderson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:

Ben Alderson wrote:Does anybody have any tips for learning the material required to pass this exam? I do have a copy of the book for Java SE 7 Programmer 1 and Programmer 2 (1Z0-803) but find it quite heavy reading and a lot of the information is not required as the exam only covers programmer 1.


Is that Kathy & Bert's book? If so, it is divided into two sections. Making it clear which part is for the OCA.



Yes it is Kathy and Berts book and you are correct it is divided into two parts, its the first 350 pages are for OCA and the rest is for OCP, however, even when reading the OCA section it makes many references to things that are only required in OCP, as well as missing out relivant information completely on topics such as programming to an interface. I have now ordered the other book thats written by Edward G. Finegan which is only for the OCA exam so i'll read through that one when it arrives

Knute Snortum wrote:I have found that Enthuware is great certificate prep software.  Basically, if you can pass their mock test, you will pass the certificate exam.



Enthuware is what I have been using and I had been achieving 50-60% in their mock tests, hopefully this would indicate that I just got unlucky on the day and got a test based on one of my not so strong subjects

Yujun Liang wrote:Actually, why not take 1Z0-808? It is newer for Java 8



The choice to take the exam was through my employer not myself, and they ask for Java 7.
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ben Alderson wrote:

Knute Snortum wrote:I have found that Enthuware is great certificate prep software.  Basically, if you can pass their mock test, you will pass the certificate exam.


Enthuware is what I have been using and I had been achieving 50-60% in their mock tests, hopefully this would indicate that I just got unlucky on the day and got a test based on one of my not so strong subjects


I think you need over 70% to be considered passing.
reply
    Bookmark Topic Watch Topic
  • New Topic