break out of for loop when it iterates over 4th even number

break out of for loop when it iterates over 4th even number

<br>

public static void main(String[] args) {
        for (int i=1; i<=10; i++) {


            if (i%2==0) {
                System.out.println("My Name is Nikki\r\n" + `enter code here`I am learning Core Java");
            }
            break;
//          else {
//              System.out.println("My name is U\r\n" + `enter code here`
// I am learning core java");
//          }

        }


    }

}


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Java Fundamentals: Learn Java for absolute beginners |Simpliv

Java Fundamentals: Learn Java for absolute beginners

Java Essentials : Learn Core Java From Basic to Advance

Learn Java Programming Using Practical Assignments. Start Building Back-end Web Applications Robust Test Automation Frameworks By End Of The Course. Learn More!

Fundamentos de Java: Aprende Java desde cero, sin misterios | Simpliv

Fundamentos de Java: Aprende Java desde cero, sin misterios