Youtube channel :- madhavgediya Java playlist :- java playlist link This video like :- video -: SWITCH CASE STATEMENT :- - A switch statement allows a variable to be tested for equality against a list of values. - Each value is called a case, and the variable being switched on is checked for each case. Syntax: The syntax of enhanced for loop is: switch(expression) { case value : //Statements break; //optional case value : //Statements break; ...
Youtube channel :- madhavgediya Java playlist :- java playlist link This video like :- video LOOPING STATEMENT Main Three Type of Loop :- 1) for loop 2) while loop 3) do_while loop -: FOR LOOP :- - A for loop is useful when you know how many times a task is to be repeated. - For loop Syntax :- For (initialization; condition; increment/decrement) { //Statements } -: WHILE LOOP :- - A while loop is a control structure that allows you to repeat a task a certain number of times. - while loop is one type entry control loop. - While Loop Syntax :- Variable declaration while(condition) { //Statements // increment / decrement } -: DO WHILE LOOP :- - A do...while loop is similar to a while loop. - Do…while loop is exit control loop. - Do While Syntax :- do { //Statements // Increment / Decremen...
Comments
Post a Comment