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"?