Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main (String [] args){
- int myInt = 6;
- if (myInt < 10){
- System.out.println("Low");
- } else if (myInt < 20) {
- System.out.println("Medium");
- } else {
- System.out.println("High");
- }
- int loop = 0;
- while (loop < 5){
- System.out.println("Looping: " + loop);
- loop++;
- }
- System.out.println();
- int loop2 = 0;
- while (true) {
- System.out.println("Looping2: " + loop2);
- if (loop2 == 5) {
- break;
- }
- loop2++;
- System.out.println("Running");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement