hello i'm new in java. but i'd like to learn more..
can someone help me in using "for,while and do while loop".
i have a problem making these.
Attachment 3977
it would be a pleasure if you could help me with this simple problem of mine.. Thanks
Printable View
hello i'm new in java. but i'd like to learn more..
can someone help me in using "for,while and do while loop".
i have a problem making these.
Attachment 3977
it would be a pleasure if you could help me with this simple problem of mine.. Thanks
Don't double post, and don't post beginner questions in the Advanced Java section. Your other thread has been removed.
Please go through all of the following:
Forum Rules -- especially the second and third paragraphs
http://www.java-forums.org/forum-gui...w-members.html
BB Code List - Java Programming Forum
How to ask questions the smart way
Note that this is a forum, not a free homework service. To get help here, you have to show some effort and make it clear what exactly you need help in understanding.
db
sorry for bothering. but in a way that i want to learn more about java..
sometimes starts with questioning someone more familiar with it...
db ^_^
Six minutes isn't long enough to read through the four web pages I linked. My conclusion is that you aren't interested in taking advice, you're just looking for some sucker to do your homework for you.
I invite you to prove me wrong.
db
public static void main(String[] args)
{
int Array[] = new int [5];
for(int number = 1;number <= Array.length;number++)
{
for(int number2 = 1;number2 <= number;number2++)
{
System.out.print(number+" ");
}
System.out.println();
}
}
}
here... i just got confused in the while loop so... i hoped someone could help me here...
i'm not looking for someone to make my assignment.. 4hrs of thinking for the while and do while for the number 1.. and i just cant figure it out..
You didn't read the links did you, because if you had you might have thought ot add [code] tags [/code] to your code.
I don't see a while loop here, actually. I think that you might mean "for-loop." Since you mentioned that you need to use a for-loop, while loop, and do-while loop in your first post, I recommend that you learn about those first: The while and do-while Statements (The Java™ Tutorials > Learning the Java Language > Language Basics) + The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
Once you understand the mechanics of what you are trying to do, you now have the power to complete this assignment. I have full faith that you can figure out the logic necessary to produce those patterns.
thanks man ... all i need is an advice... and a PDF java tutorials file XD...