🎯 Key Takeaways for quick navigation: 00:00 🔄 *For Loop Introduction* - Introduction to the for Loop in Java. - Comparison with while loop structure. - Overview of initialization, condition, and increment statements in for Loop. 01:13 🔄 *For Loop Syntax* - Explanation of combining initialization, condition, and increment statements in a single line. - Differentiating for Loop from while loop regarding this syntax. - Practical demonstration of a simple for Loop example. 02:35 🔄 *Working of For Loop* - Understanding the execution flow of for Loop. - Demonstrating the role of initial value, condition check, and increment in a for Loop. - Practical example of printing values in both increment and decrement order. 04:51 🔄 *Common For Loop Syntax* - Introduction to a common syntax for for Loop with initialization, condition, and increment statements. - Clarification on using "less than" for ending at a specified value. - Practical example of printing values starting from zero and ending before four. 05:59 🔄 *For Loop for Building a Calendar* - Demonstrating a practical example of using for Loop to build a weekly calendar. - Nested for Loop usage for printing hours in a day. - Addressing challenges and debugging issues during the example. 11:19 🔄 *Execution Sequence in For Loop* - Explanation of the execution sequence in a for Loop. - Debugging demonstration to showcase the order of execution. - Flexibility to skip the initialization or increment statement in the for Loop structure. Made with HARPA AI
🎯 Key Takeaways for quick navigation: 00:13 For loops provide a concise way to initialize, conditionally iterate, and update a counter variable in one line. 01:55 The for loop syntax allows you to combine initialization, condition, and increment/decrement statements in one line, separated by semicolons. 02:22 Make sure to set the initial value correctly, as the loop will not run if the initial value doesn't meet the condition. 03:15 You can start the loop at zero, but be mindful of the ending condition to ensure the desired number of iterations. 04:51 Common practice is to use "less than" condition for loops that start from zero and end before a specific value. 06:42 Nested loops can be used to create patterns or print structured data, like days and hours in a calendar. 08:47 When concatenating numbers and strings, use parentheses to ensure proper mathematical operations. 10:10 Be cautious when setting loop conditions involving numbers and time intervals, ensuring accurate ranges. 11:19 For loops execute the initialization, condition check, and increment/decrement sequentially for each iteration. 12:56 It's possible to skip parts of the for loop structure and perform necessary operations outside the loop if needed. Made with HARPA AI
real-time examples are very confusing sometimes it all messes up , better if you have some prepared examples but really I enjoy your lectures sir and learn something extra !
So, I was following your code at the end to make my own kind of Daily Schedule. public static void main(String a[ ]) { System.out.println("My weekly school schedule on Java!"); for (int i = 1; i
🎯 Key Takeaways for quick navigation:
00:00 🔄 *For Loop Introduction*
- Introduction to the for Loop in Java.
- Comparison with while loop structure.
- Overview of initialization, condition, and increment statements in for Loop.
01:13 🔄 *For Loop Syntax*
- Explanation of combining initialization, condition, and increment statements in a single line.
- Differentiating for Loop from while loop regarding this syntax.
- Practical demonstration of a simple for Loop example.
02:35 🔄 *Working of For Loop*
- Understanding the execution flow of for Loop.
- Demonstrating the role of initial value, condition check, and increment in a for Loop.
- Practical example of printing values in both increment and decrement order.
04:51 🔄 *Common For Loop Syntax*
- Introduction to a common syntax for for Loop with initialization, condition, and increment statements.
- Clarification on using "less than" for ending at a specified value.
- Practical example of printing values starting from zero and ending before four.
05:59 🔄 *For Loop for Building a Calendar*
- Demonstrating a practical example of using for Loop to build a weekly calendar.
- Nested for Loop usage for printing hours in a day.
- Addressing challenges and debugging issues during the example.
11:19 🔄 *Execution Sequence in For Loop*
- Explanation of the execution sequence in a for Loop.
- Debugging demonstration to showcase the order of execution.
- Flexibility to skip the initialization or increment statement in the for Loop structure.
Made with HARPA AI
🎯 Key Takeaways for quick navigation:
00:13 For loops provide a concise way to initialize, conditionally iterate, and update a counter variable in one line.
01:55 The for loop syntax allows you to combine initialization, condition, and increment/decrement statements in one line, separated by semicolons.
02:22 Make sure to set the initial value correctly, as the loop will not run if the initial value doesn't meet the condition.
03:15 You can start the loop at zero, but be mindful of the ending condition to ensure the desired number of iterations.
04:51 Common practice is to use "less than" condition for loops that start from zero and end before a specific value.
06:42 Nested loops can be used to create patterns or print structured data, like days and hours in a calendar.
08:47 When concatenating numbers and strings, use parentheses to ensure proper mathematical operations.
10:10 Be cautious when setting loop conditions involving numbers and time intervals, ensuring accurate ranges.
11:19 For loops execute the initialization, condition check, and increment/decrement sequentially for each iteration.
12:56 It's possible to skip parts of the for loop structure and perform necessary operations outside the loop if needed.
Made with HARPA AI
Excellent💯😃
But what do you mean by barpa Al
??
@@AnuragRawat01 this timestamp given by harpa_ai
The summary was made using Harpa AI online service @@AnuragRawat01
Please sir make Data Structure and Algorithm Course in Java.
Already available. The problem is you don't like exploring you want ready spoon-feeding
@wahidurrahman77 My comment is from 1 year ago, and Navin sir upload DSA course a few months ago.
11:30
first it will pick i value
second it will check the condition 1
real-time examples are very confusing sometimes it all messes up , better if you have some prepared examples but really I enjoy your lectures sir and learn something extra !
Sir you are excellent. 😊
Calendar with AM and PM supported :
class Hello {
public static void main(String args[]) {
for (int i = 1; i 12 ? j - 12 : j) + (j >= 12 ? " PM" : " AM") + " - "
+ (endTime >= 12 ? (endTime == 12 ? endTime : endTime - 12) + " PM" : endTime + " AM"));
}
}
}
}
I like the high quality video its great
sir did u teach how to take userinput?
couldnt you also just make j=9 and j
You are awesome!!!
Instead of adding the j with 8, we can initialize j=9;j
But this gave us different knowledge
So, I was following your code at the end to make my own kind of Daily Schedule.
public static void main(String a[ ]) {
System.out.println("My weekly school schedule on Java!");
for (int i = 1; i
initialize your k with 0 k=0
What if at 2:56 we do
for( i=5; i
it will run forever until it exceeds your memory
You won't be getting any results
Sir after completing ur whole course did u provide any certificate for completion of course
Thank you 😊
thank you
Thanks
sir please do a playlist of dsa with python
What is the need for while loop if for loop uses less space?
I hope, if we know the limit we use for loop. If we don't know the limit (numerical value) we use while loop.
@@durgaraoponnuru17if we know the no of iteration then have to use for right?
@@chaithanyajog4554 Not Sure.. But I guess.
Awesome, now I'm even more lost.
Just came up with without railway time 👍👍
for(int i=1;i
May be you know the syntax & programming logics but your explanation is wrong
क्यों नाराज़ हो रहे, भाई?
for(int j=1;j12?(String.format("%02d",(j-12))):
//String.format("%2d", variable)
//append 0 before single digit
(String.format("%02d",j)))+
":00" + (j>=12? "pm" : "am")+ "-" +
//determine am and pm
(l>12&&l!=24?(String.format("%02d",(l-12))):
//append 0 before single digit
l>12&&l==24?(String.format("%02d",(l=0))):
//12 am becomes 00 am
(String.format("%02d",l)))+
":00"+ (l>11 && l!=24 ? "pm" : "am"));
//12 am excluded
}