RUVIDEO
Поделитесь видео 🙏

Java Interview Questions | Control Statements | Fresher Interview | Java Tutorial | Code Bode

#javainterviewquestionsandanswers #javatutotial #controlstatements

Hi Guyz,

This video covers most commonly asked interview questions and answers on if, for, switch, for loop, while loop,do-while loop, continue

Q.1) What are the three loops in Java?
Ans. For llop,while loop and dowhileloop

Q.2) Difference between while loop & do while loop?
Ans. In while loop condition is checked first . Only if the condition is true loop is executed.
In do while loop first loop is executed and then condition is checked. So loop executes atleast once.

Q.3) Real time example where do while can be used?
Ans . Program to take input until user enters 0.
int number=0;
Scanner sc = new Scanner(System.in);
do {
system.out.println(“Enter a number”);
number = sc.nextInt();
}while(number!=0)

Q.4) Difference between break & continue?
Ans. Break terminates the loop. Continue exits the current iteration

Q.5) what happens if we write switch without break?
Ans. we write switch without break all conditions are executed even if condition is matched in one of the case

Q.6) When to use switch statement over if?
Ans. When the condition is to be checked against list of values switch should be used. For checking boolean conditions if statement can be used.
e.g, displaying month or week from number

Q.7) Can we have two identical cases inside switch
Ans. No. Switch allows unique cases only

Q.8) What will be the output of?
for(;;) {
System.out.println(“1”);
}

Ans.Infinite loop

Q.9) what are nested for loop?
Ans. Loop inside loop is a nested for loop

Q.10) Can we have nested switch?
Ans. Yes

#arraysinjava #javatutorial #reversearray

Hi Guyz,
In This Video We will learn how to reverse an array in java.
Algorithm -
1) Take a predefined array or take a user input array
2) Print the array as it is
3) Iterate a loop from arrayLength-1 up to 0 and in each iteration decrement the index
4)Print value of array inside the loop


Watch the video for understanding the code step by step.

Other Playlist :

Eclipse Tutorial :
https://www.youtube.com/playlist?list=PLQH2XCVoqus2AmSJqpVOoZWizsXtjcaHO
HTML Tutorial :
https://www.youtube.com/playlist?list=PLQH2XCVoqus3wQNcNN_QjOGNFj7Ih4w8g
Java Learning Path :


HAPPY LEARNING!

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Interview Questions | Control Statements | Fresher Interview | Java Tutorial | Code Bode», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.