#i a completely new in java and i am confused in looping
30 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
Welcome to Java! Since you're new and trying to understand looping, I recommend you first solidify your grasp of the basic loops in Java — for, while, and do-while. Practice writing simple loops like counting numbers, iterating through arrays, or accumulating sums.
Once comfortable, move on to more advanced concepts like nested loops, loop control statements (break, continue), and enhanced for-each loops, especially for collections.
After mastering loops, consider exploring:
- Arrays and ArrayLists (to understand data structures you often loop over)
- Methods (to organize code you write inside loops)
- Basic algorithms involving loops (like searching or sorting)
Progress step-by-step and focus on practicing small coding challenges to strengthen your understanding.
Useful links:
Keep practicing — looping is fundamental and mastering it will pave the way to more complex programming topics!
Is there an example you're confused by that we could help with?
Whatever interests you
?
What do you mean pursue next
once you're comfortable with the language and standard library try to make something with external libraries so you can learn about them and how to build projects
i dont even know to connect two strings T_T
video
Did you finish it?
im just doing basic programs right now
"str1" + "str2"
Are you confused about loops?
yes
For learning Java, we recommend the ebook Modern Java:
https://javabook.mccue.dev/
It is completely free, meant for beginners and covers all content relevant for the first year. It is a great way to learn Java from the ground up.
If you run into any questions during your journey, you may ask us in #1051826284008853505 and we will help 
If you prefer a more traditional learning experience, we also recommend MOOC:
https://java-programming.mooc.fi/
This is the course used by the University of Helsinki to teach their students programming in their first year, also completely free.
We generally recommend resource like the above over videos. The information density of videos is generally pretty low. The ability to stop and reread, or copy and paste, is non-existent. The first link uses a much more modern Java ( 25 or newer) and teaches the concepts in an order that is good for absolute beginners. The second link used Java 8 (you can use Java 11, but it's only teaching Java 8) but has server-checked exercises to submit.
while loops repeat code while the statement is true. So while (isRunning) { //code } repeats the code block as long as isRunning is true.
When you want to go through an array with a while loop you would do something like
int i = 0;
while (i < array.length) {
System.out.println(array[i]);
i++;
}
for loops make this code more compact by moving the top part that sets i and the bottom part that updates it into the loop. So instead of above you could write
for (int i = 0; i < array.length; i++) {
System.out.println(array[i]);
}
both start with i equal to 0, both loop as long as i is less than the length of the array, and both increase i by 1 at the end of each loop
but yeah what talden said
ok
Nothing wrong with posting an example to get help on though.
ok
im a student and my school only teaches us java on notepad
should i use any text editor like eclipse?
https://midnightcoder.dev/challenge for project ideas/blueprints