This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
author & internet detective
Posts: 39387
760
Eclipse IDE VI Editor Java
  • 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.
 
Ranch Hand
Posts: 211
27
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
Posts: 39387
760
Eclipse IDE VI Editor Java
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!