Jump to content

segment code

- - - - -

  • Please log in to reply
2 replies to this topic

#1
bigneo

bigneo

    Newbie

  • Members
  • Pip
  • 4 posts
Hi people, got a question here. Problem in exam says (Write a segment of code...) . I know that it is simply a code text whitout all the public class n stuff, but can anyone tell me where segment code should start and where ends exactly? do i need to use curly brackets in segment code to finish program? sry for nub question :p and tnx in advance :thumbup1:.

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
There's no formal definition for a "segment" of code in your particular case. A "block" of code is one that is surrounded by curly braces, but that may not be enough to sufficiently answer the question on the exam.

Basically, when an exam requires you to write a "segment" of code, think of it as simply all the relevant pieces to adequately answer the question, and nothing extra. In other words, common sense should guide you. :)
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
bigneo

bigneo

    Newbie

  • Members
  • Pip
  • 4 posts
cheers, i have figured it out




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users