You have created a basic greeting program in Java that displays a message "Hello, World!" and the current year. However, some parts of your Java program are missing. Your task is to correctly fill the blanks in your code to ensure it prints the supplied greeting and combines it with a statement welcoming the user to the current year.
Writing first program
Complete the code for a greeting and year display
Report a typo
Fill in the gaps with the relevant elements
HelloWorld {
public static void main(String[] args) {
String greeting = "Hello, World! Learn programming with us!";
(greeting);
}
} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.