Tuesday, 28 August 2012



As you can see, even the Java class requires several lines of codes and contains somewhat perplexing syntax. Large applications that perform many tasks include much more code, and as you write larger applications it becomes increasingly difficult to remember why you included steps or how you intended to use particular variables. Documenting your program code helps you remember why you wrote lines of codes the way you did. Program comments are nonexecuting statements that you add to a program for the purpose of documentation. Programmers use comments to leave notes for themselves and for others who might read their programs in the future. At the very least, your Java class files should include comments indicating the author, the date, and the class name or function. The best practice dictates that you also include a brief comment to describe the purpose of each method you came within a class.



The Flow Control & Arrays



Programs are much more than the simple sequential execution of statements.  We often need to excute a section of code repeatedly, perhaps with a change of some of the program's state each time.  We also commonly need to execute different sections of code depending upon whether some condition is true of false.  This lesson will discuss these two types or flow control that are commonly seen in programs: Looping and Branching. An array is a very common type of data structure where in all elements must be of the same data type. Once defined , the size of an array is fixed and cannot increase to accommodate more elements.The first element of an array starts with zero.

Click here for more info