• 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

Doubt about implicit 'file' assumtions on exam

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!

I'm actually preparing for OCA exam, and have a question about what are the 'implicit' assumtions about files containing the code present on exam.
If nothing stated about it on exam questions, should we assume that all code is on the same file? One file for each class declaration on code?

I've readed that if the first row is NOT numbered as 1, list code is not explicit (and 'gaps' in code are right sintactically) - I call it NotOneNotComplete rule-, but read nothing about file assumption.

Could someone help me?

Thanks in advance!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jose,
Welcome to CodeRanch!

You can assume the code is in one file unless it is clearly stated otherwise. Ways that can happen:
  • Two or more package statements.
  • Two or more sets of line numbers that begin with one
  •  
    Marshal
    Posts: 79177
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Aren't those assumptions written out somewhere?

    And JB: welcome to the Ranch again.
     
    jose barba
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Campbell Ritchie wrote:Aren't those assumptions written out somewhere?

    And JB: welcome to the Ranch again.



    Thanks!!!

    Don't remember have seeing it yet, but in chapter 5 there's a note indicating that if in a code block there's an interface definition and a public class, i must assume that each goes in a different file (i assume this is for book convenience, not a exam 'constraint'), but i don't remember other reference at this topic earlier in the book.
     
    jose barba
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jeanne Boyarsky wrote:Jose,
    Welcome to CodeRanch!

    You can assume the code is in one file unless it is clearly stated otherwise. Ways that can happen:

  • Two or more package statements.
  • Two or more sets of line numbers that begin with one


  • Thanks for this warm welcome Jeanne!!
     
    Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic