Showing posts with label initialization. Show all posts
Showing posts with label initialization. Show all posts

Monday, 20 January 2014

Using object in java

As you know, a class provides the blueprint for objects; you create an object from a class.A typical Java program creates many objects, which as you know, interact by invoking methods. Through these object interactions, a program can carry out various tasks, such as implementing a GUI, running an animation, or sending and receiving information over a network. Once an object has completed the work for which it was created, its resources are recycled for use by other objects.

Saturday, 4 January 2014

Iteration statements:for loop in java

The most common iteration Statements in Java

Iteration Statement: for loop

The 'for' LOOP:

The for statement provides a compact way to iterate over a range of values. Programmers often refer to it as the "for loop" because of the way in which it repeatedly loops until a particular condition is satisfied. If only one statement being repeated, there is no need for the curly braces. When using this version of the for statement, keep in mind that,The initialization expression initializes the loop; it's executed once, as the loop begins.