0

I am having diffculty to understand java in condition and loops first section?

16th Jan 2019, 4:57 AM
Anshuman Kapoor
Anshuman Kapoor - avatar
7 Réponses
+ 1
Thanks Denis it actually worked
16th Jan 2019, 7:23 AM
Anshuman Kapoor
Anshuman Kapoor - avatar
0
Could you specify? Are you talking about a specific loop or condition or in general?
16th Jan 2019, 5:49 AM
Eldar Bakerman
0
loop or condition
16th Jan 2019, 6:03 AM
Anshuman Kapoor
Anshuman Kapoor - avatar
0
oh okay
16th Jan 2019, 6:06 AM
Anshuman Kapoor
Anshuman Kapoor - avatar
0
The logic is the same as loops and conditions in other languages. If it is easier for you, start with another language. You can eventually come back to Java and see that it does not differ too much from other programming languages. Good luck & happy coding!
16th Jan 2019, 6:37 AM
Felix Pernat
Felix Pernat - avatar
0
I want to add that Java is quite a simple language and apart from the oop aspect one of the easiest to start with and build up on later (imho)
16th Jan 2019, 6:39 AM
Felix Pernat
Felix Pernat - avatar
0
Conditions: Something will happen if the condition is fulfilled. int a = 2; int b = 3; If (a < b){ //some code } If (a + b > 0){ //some code } else { // when a+b < or = 0 //some code } If you want to repeat something use loops. If you know how often use a for-loop. For (int i = 0; i < 10; i++){ //some code } If you know the condition but not when it will be fulfilled use a while loop while (a + b < 0){ //some code }
16th Jan 2019, 6:57 AM
Denise Roßberg
Denise Roßberg - avatar