Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Ganesh Patekar

Bartender
+ Follow
since Jun 24, 2015
Ganesh likes ...
Eclipse IDE Hibernate jQuery MySQL Database Spring Tomcat Server
This soul began to dwell in this body named Ganesh Patekar since 31/07/1987 in Solapur, Maharashtra, India.
Being youngest child in the family had happy childhood but I was also an obstinate kid As days go by I became more amiable.
I had persuaded Bachelors of computer application( BCA, Batch 2007-10 ) from Sinhgad College of Science, Pune. I’m so greedy about learning so couldn’t stop there so persuaded Master of computer application ( MCA ) from Sinhgad Institute of Management, Pune. I used to act as emcee and compare in college events. Those were the best days of life.
I really adore to learn new things. I always eager to write a beautiful code I enjoy visiting natural places near by Pune on weekends.
I’m passionate about maintaining good physic so I do yoga, pranayama and workout regularly because I think, health is wealth.
Pune, Maharashtra, India.
Cows and Likes
Cows
Total received
27
In last 30 days
0
Total given
7
Likes
Total received
141
Received in last 30 days
0
Total given
244
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt Green check

Recent posts by Ganesh Patekar

Here is the OCAJP Wall of fame reading their story will be helpful to see how others prepared for the exam. I would not recommend using any IDE while preparing for this exam since IDE helps you in so many ways, better use any text editor. Write the code in text editor, analyse It and guess whether It compiles Or not then compile and see you were correct Or not, If runs successfully then what would be the output?  asking such questions to yourself and answering them will clear all your doubts.
Congratulations all of you !!  

And thank you !!
3 months ago
Welcome back Daniel Owen Williams !! 
3 months ago

Neal Kornreich wrote:Do you know if anonymous classes are on the OCA exam?

I've checked OCAJP8: 1Z0-808 syllabus It's not there but It is mentioned in OCPJP8: 1Z0-809 but as Campbell said you better refer Oracle's official site for such information which is always up to date before taking any exam.
3 months ago

Liutauras Vilda wrote:I think nested inner class can access enclosing classes private members

Yes 

not other way round.

No, enclosing class can access private members of inner class.

Also private member of inner class is accessible in another inner class (of same enclosing class) which is already stated in Campbell's JLS quote.
Here is an example

But I might misunderstanding the wording.

Yes It is all about wording that's why hats off to those who document JLS.
3 months ago
Don't forget to add your name to OCAJP Wall of Fame
3 months ago
Congratulations !! That's good score 
3 months ago

Stephan van Hulst wrote:an enclosing class can access private members of a nested class.

Agreed I was wrong. I didn't think of private members declared in inner class.
3 months ago
Congratulations Mario Aguero,

and welcome to CodeRanch !! 
3 months ago
Welcome to CodeRanch !! 
3 months ago

Junilu Lacar wrote:I think the book is referring to the switch part, not the case selectors.

Agreed since the book clearly explains The values in each case statement must be compile-time constant values of the same data type as the switch value under the heading of Compile-time Constant values.
4 months ago

Stephan van Hulst wrote:An overview:
private: Only code within the same source file can access the member.

I don't think so since a source file (a .java file) can have code of another class which doesn't have access to the private member of another class defined in the same source file.
Test.java (a source file)

Rather I would say private members are directly accessed only within the class they are declared in.
4 months ago