> White Space in java ~ Online tutorial

White Space in java

White Space
  • Just as a book contains blank areas to separate sections of text (between paragraphs for example), so should a computer program.
  • These blank areas are known as white space and are created with presses of the , and keys.
  • Your code must have white space between components of the language, as in public void run instead of publicvoidrun, but Java itself ignores extra white space, with one exception we'll describe shortly.
  • Good use of white space dramatically improves the readability of a computer program.
    • Note the difference between 
      int x,y; 
      double sumOfScores; 
      println("Please enter the scores: "); 
      and
      int x, y;
      double sumOfScores;
      println("Please enter the scores: ");

      Both have exactly the same statements and the same effect but the second group is clearly much easier to read and understand because of the white space.

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: