Write a code in java to explain the while loop in java, JAVA Programming

Assignment Help:

Write a code in java to explain the while loop in Java?

// This is the Hello program in Java

class Hello {

public static void main (String args[]) {

System.out.print("Hello "); // Say Hello
int i = 0; // Declare and initialize loop counter
while (i < args.length) { // Test and Loop
System.out.print(args[i]);
System.out.print(" ");
i = i + 1; // Increment Loop Counter
}
System.out.println(); // Finish the line
}

}


Related Discussions:- Write a code in java to explain the while loop in java

Name conflicts when importing packages, Name Conflicts when importing packa...

Name Conflicts when importing packages It is possible which you will try to import a package which contains classes in which have the similar name as a class in your own source

What is initializing fields, What is Initializing Fields ? Fields can (...

What is Initializing Fields ? Fields can (and often should) be initialized while they're declared, just like local variables. class Car { String licensePlate = ""; // e.g

what is meant by binding in rmi, Binding is a method of associating or re...

Binding is a method of associating or registering a name for a remote object that can be used at a later time to look up that remote object. A remote object can be linked with a na

Decision tree algorithm, how to give dataset to a decision tree which is wr...

how to give dataset to a decision tree which is written by java using weka software?

Determine why java is robust, Determine Why java is robust Java ...

Determine Why java is robust Java is very robust o Both, vs. unintentional errors and vs. malicious code such as viruses. o Java has slightly worse performance as

What is meant by universal access of internet services, What is meant by un...

What is meant by universal access of internet services ? the meaning of Universal access of internet services means same functionality to everyone.

Why we intrested studying social implications of creation, Why should we, a...

Why should we, as computing professionals, be interested within studying the social implications of our creations? This is important Because of remaining the track of money wis

43560 square feet., calculate the size of the tract of land by the size of ...

calculate the size of the tract of land by the size of an acre to get the number of acres.

School management, i need java program for account to hold payment of stude...

i need java program for account to hold payment of student

Javascript, You can declare a variable by the var statement such as: var...

You can declare a variable by the var statement such as: var strname = some value You can also declare a variable with simply assigning a value to the variable. Although, if

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd