Unscramble the greeting message program

Report a typo

Your peer has written a piece of Java code that prints a greeting message to the console. However, they seem to have scrambled the order of the code lines in the rush. Your task is to reorder the lines so they form a properly structured and functional Java program. Don't forget the best practices in coding style conventions concerning indentions when rearranging the lines.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                public class HelloWorld {
              
                }
              
                System.out.println(greeting);
              
                }
              
                public static void main(String[] args) {
              
                String greeting = "Hello, World!";
              
___

Create a free account to access the full topic