Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Questions about review question in book : OCA: Oracle® Certified Associate Java® SE 8 Programmer I

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a beginner question regarding the assessment test at end of chapter 1.

In chapter 1, it is mentioned that "..You need to know one more thing about class structure for the OCA exam: multiple classes can be defined in the same file, but only one of them is allowed to be public. "...

However in questions 5, 6, 7 at the end of chapter 1, there are multiple public class being declared.  According to the answers these are valid.  So are we to assume that when we see multiple public classes being defined they are from different files?  Or am I missing something here?

 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

wei we wrote:However in questions 5, 6, 7 at the end of chapter 1, there are multiple public class being declared.  According to the answers these are valid.  So are we to assume that when we see multiple public classes being defined they are from different files?


Yes, you should assume this both in study guides and on the real exam.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic