Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
author & internet detective
Posts: 39996
807
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: 221
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: 39996
807
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.
 
You have to be odd to be #1 - Seuss. An odd little ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic