Hi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help.
4 1347
Hi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help.
Check out this tutorial for Sun's tutorial of loops in Java.
This questions is being moved to the Java forum.
ADMIN
you can write some sample code,try to execute it.post the erros and sample code... then it will be easier to show you right way.
Hi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help.
you can write some sample code,try to execute it.post the erros and sample code... then it will be easier to show you right way.
if-else are just blocks and not loops.
loops are those loop back till the given condition holds true.
for,while and do-while each have their own conditions checked during the iterations. Go thru the references available online or a basic java book.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Maurice LING |
last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic
typing, is there any other real reasons that Python is slower than Java?
maurice
|
by: pawel |
last post by:
I have made some comparision C# to Java RegularExpression. The problem was
to find out if the rule match some text.
Matching were done for precompiled regular expressions, in 100000 iterations...
|
by: Gaurav |
last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250
Any comments?
Thanks
Gaurav
|
by: Allerdyce.John |
last post by:
Hi,
I am trying to compare the amount of work between using STL algorithm
VS a plain Java loop.
Let's say the class Rect has 2 attributes: area, and areaPerCent.
In Java, I just write a...
|
by: shblack |
last post by:
I need help with a program I am writing for school. The program has to do the following:
/*
1. Character string must be a minimium of 15 charactors.
2. If not 15 characters long it must give...
|
by: paduffy |
last post by:
Folks,
I've a Python 2.5 app running on 32 bit Win 2k SP4 (NTFS volume).
Reading a file of 13 GBytes, one line at a time. It appears that,
once the read line passes the 4 GByte boundary, I am...
|
by: mlw |
last post by:
Do not take anything about this, it is not a flame or troll, while I'm not
new to Java I favor C++. However, I may need to use it in a contract
position, and am concerned that the restrictions it...
|
by: Lloyd Bonafide |
last post by:
I followed a link to James Kanze's web site in another thread and was
surprised to read this comment by a link to a GC:
"I can't imagine writing C++ without it"
How many of you c.l.c++'ers use...
|
by: blazzer |
last post by:
Hi,
I'm beginner at Java. I'm confused with my simple program of using while loops
int i = 1;
while (i <= input){
System.out.println("Enter description of product #" + i + "...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |