The Ultimate Java Mastery Series - Ultimate Java Part 1: Fundamentals

Hi, Mosh and other users of this service

I would like to comment code in the section While Loop.

An example at the beginning of the video which should represent the same code in While Loop is not similar as For Loop.

This code:
int i = 0;
while (i > 0){
System.out.println("Hello World " + i);
i–;
}

, is not executed, so you need to change int i = 5.

That’s all,

Best wishes,
Slavimir

You are right, of course. And welcome to the forum :+1:

Hello all, I have just signed up. Looking forward to learning more about Java!

Hi friends!

I am refering to the exercise at the end of Part 1: fundamentals.

What is the standard practice in Java for refactoring the codes and creating methods? why?

A. Do the codes first and then refactor them into methods.
B. Create the methods straight away.

I got a problem when I create the methods straightaway.