Fixing the greeting message compiler error

Report a typo

Reorder the lines to declare a String variable for a greeting message and print it out. Make indentations to make a program easily readable. Press right arrow button to make one full indentation, left arrow button to remove one.

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

Create a free account to access the full topic