• 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

Ambiguous statement on page no 22 in OCA 7 MalaGupta

 
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Under the heading: DEFINITION OF SINGLE AND MULTIPLE CLASSES IN A SINGLE JAVA SOURCE CODE FILE


Statement:
You can define either a single class or an interface in a single Java source code file, or "many such files"

Now if we see the quoted text,that what I found somehow not imparting its actual meaning, yeah surely you can have multiple java files with a single class or interface, but I think author wanted to convey that many classes or interface can exist in a single file.

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sachin Tripathi wrote:Now if we see the quoted text,that what I found somehow not imparting its actual meaning, yeah surely you can have multiple java files with a single class or interface, but I think author wanted to convey that many classes or interface can exist in a single file.


I agree that the statement is not as clear as it could be and it would really become more obvious it was rephrased to: "You can define either a single class or an interface in a single Java source code file, or define multiple classes and interfaces in a single Java source code file." (or something similar).

Hope it helps!
Kind regards,
Roel
 
Sachin Tripathi
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it would be great if we will have errata list for Mala Gupta too.As we already have one for k and B
As they are the 2 major books in this field.
 
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

Sachin Tripathi wrote:I think it would be great if we will have errata list for Mala Gupta too.As we already have one for k and B
As they are the 2 major books in this field.


For Java 7. For Java 8, my book does have an errata list posted.

In response to your question though, the book has an errata list maintained by the publisher. I'll add it to the forum header.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:In response to your question though, the book has an errata list maintained by the publisher.


And they have an OCA Java SE 7 Programmer I Certification Guide forum as well to post errata/suggestions/typos/doubts/... but it seems not to be as active as this one. So if you are in doubt about a statement, you can always start a new topic here and if it's confirmed at a new topic in the author's forum to report the errata item.
 
Sachin Tripathi
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will be adding to this post the errors (that are still not mentioned in the errata list managed by author) I will discover while reading Mala Gupta's OCA book,

I will request Roel ,Jeanne and every one on this forum reading Mala Gupta's OCA book to do the same.

I was trying to change the subject to :Errata list of Mala Gupta's OCA Java SE 7
But was unsuccessful, if someone can help me with this.
 
Sachin Tripathi
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Page no:38
Heading:CAN ACCESS MODIFIERS BE APPLIED TO ALL TYPES OF JAVA ENTITIES?
Content:Access modifiers can be applied to classes, interfaces, and their members (instance and class variables and methods).

Reason:I find this incomplete,as nothing is mentioned about constructor (member of class),it is surely not a method or a variable.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sachin Tripathi wrote:I will be adding to this post the errors (that are still not mentioned in the errata list managed by author) I will discover while reading Mala Gupta's OCA book,

I will request Roel ,Jeanne and every one on this forum reading Mala Gupta's OCA book to do the same.


I don't like this idea! First of all, it's not a good idea to start an unofficial (incomplete) errata list on your own while the publisher is maintaining an official errata list. That will become confusing very fast.

Secondly, just posting all errors you discover in one sole thread doesn't make it an errata list. Because some of the posted errors might not be errors at all, when you are reading and posting errata items for chapter 3 someone else is posting errata items of chapter 5 and another reader just started reading and is posting items of chapter 1,... Maybe you should have a look at the K&B7 errata thread to see how quick such an approach turns into an absolute mess.

Sachin Tripathi wrote:I was trying to change the subject to :Errata list of Mala Gupta's OCA Java SE 7
But was unsuccessful, if someone can help me with this.


Unless Mala Gupta herself (and her publisher) approve the creation of another (official) errata list, we won't start with a seperate errata list. If she approves, we will take the same approach as K&B7: we will create a seperate thread to post possible errata items and keep an up-to-date (ordered by page) list of the errata. So it's a good thing you couldn't change the subject

Kind regards,
Roel
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sachin Tripathi wrote:Reason:I find this incomplete,as nothing is mentioned about constructor (member of class),it is surely not a method or a variable.


You could indeed argue that constructors should be added to that list. But a constructor is not considered a member of a class. So adding constructors to that statement would become a little tricky (as interfaces don't have constructors).

And what about the next sentence? Should be: "Local variables, constructor and method parameters can’t be defined using access modifiers." (otherwise it's also incomplete)
 
Sachin Tripathi
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,after posting it i too ,realised,allowing multiple users will create a mess.

The problem is that there should be a chapterwise errata list (which should be managed by author)especially for books meant for particular exams(certification).

Many times reader reads a line and interpret something else ,what surely author didn't meant.like in this case

After the above stated sentence she uses 2 example in which she used constructor without explicit access modifier( even though it has package private as an access modifier)
In later example she came back on track and started using access modifier explicitly for constructor.
But a little careless reader would have made an image in his mind ,by that sentences and immediately following example that:
Among all components of class only class and its members can have access modifier which is wrong..

Reading jls ,raised 2 problems: 1-it was toooo difficult to understand
2-it made me a very careful reader...
 
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

Sachin Tripathi wrote:The problem is that there should be a chapterwise errata list (which should be managed by author)especially for books meant for particular exams(certification).


And there is. Hence not sure why you want another one here.

Roel's suggestion to post here if you aren't sure if something is an errata is different than this site being the errata list.
 
Sachin Tripathi
Ranch Hand
Posts: 373
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah it exist but it don't have all possible errors or unclear sentences..So reader must be able to post the errors he feels,and author should include in errata list as soon as it is found genuine
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sachin Tripathi wrote:Yeah it exist but it don't have all possible errors or unclear sentences..So reader must be able to post the errors he feels,and author should include in errata list as soon as it is found genuine


That's perfectly normal. I think very few errata lists will have all possible errors and unclear sentences, even the errata lists of K&B7 and Sybex 8 (which are regularly maintained) probably don't contain all errors/typos/... But adding a second (incomplete) errata list would be of very little (if any) added value. And at this point Mala Gupta is probably very busy with finishing her OCP study guide so that could probably be the main reason why it takes some time before errata are confirmed and added to the list

But don't forget: if you are in doubt about a statement, you can always create a new topic and share your doubts/questions with this great knowledgeable Java community. And in this forum you are almost guaranteed to get an (informative) answer within at most 1 day, because many experienced developers and even study guide authors are very active in this forum.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic