Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sybex - OCA 8 - bitesOfCheese cannot be resolved to a variable

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. page 32 – chapter 1, row 13 - "bitesOfCheese cannot be resolved to a variable".
I use Netbeans and I write these codes in it, but Netbeans shows me another compile error - "cannot find symbol". This surprised me. Then I download Eclipse and test it. Eclipse shows me error which you write in book. Probably you use Eclipse as IDE and errors are given according to the Eclipse. But it confuses who use Netbeans.

I got this question about my OCA 8 book over email. I'm answering it here because I can envision others having the same question/concern.

Exact compiler messages vary across versions of Java and IDEs. I did in fact use Eclipse to get the text for that particular error. For the exam, you will never be asked to identify an exact error message. You will be asked one of two things:
1) Is a compiler error thrown anywhere?
2) Is a compiler error thrown on line X.
 
Mushfiq Mammadov
Ranch Hand
Posts: 187
25
Java jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:For the exam, you will never be asked to identify an exact error message. You will be asked one of two things:
1) Is a compiler error thrown anywhere?
2) Is a compiler error thrown on line X.

Little nitpicking about verbiage: I don't like "thrown" for compiler errors. For me only exceptions (both checked and unchecked/runtime) and errors (as in subclasses of java.lang.Error) can be thrown.

I prefer something like:
1) Does compilation fail due to a compiler error anywhere?
2) Does compilation fail due to a compiler error on line X?

Just my 1 (2) cent(s).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35266
383
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the actual book, the answer is choice is "the code does not compile" or "compile error on line X". In my brain, I still think about compiler errors being thrown which means in the forum, I write that way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic