• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Difference in definition for class level default access in OCA study guide(Sybex) and Java docs

 
Greenhorn
Posts: 8
1
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please let me know if my understanding is wrong here regarding the below 2 statements from the respective sources. The statements deal with default access specifier at class level.According to me they are not saying the same things.

Source 1 : OCA Oracle Certified associcate Java SE 8 Progammer 1 Study Guide  (Jeanne Boyarsky and Scott Selikoff) : Chapter 5 , Pg : 237

The default package private modifier , which is the lack of  any access modifier, indicates the class can be accessed only by a subclass or class within the same package.


Source 2 : Java docs ( https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html )

If a class has no modifier (the default, also known as package-private), it is visible only within its own package



Am I comparing not equivalent things here ? If not, could you please explain how they are same.
 
Maxitoxin Mayank
Greenhorn
Posts: 8
1
Tomcat Server Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After posing the question, i stumbled upon an already existing post on the same issue. So i suppose it is now answered.

The post is here for your reference.

https://coderanch.com/t/653735/certification/Ambiguous-statement-page-Java-OCA
 
Marshal
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you understood the point, so in that way it's answered by the thread you linked to. Thanks for searching, finding, and posting the link.

However, a warning about that thread: the answer comes pretty early on and then the thread drags on with a lot of pretty pointless arguing about unrelated issues. So you don't need to read the whole thing!
 
author & internet detective
Posts: 39343
755
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a cow for finding the answer to your own question!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!