Uncomment one specific line of code so that the program prints the longest string. Don't let the content of the messages confuse you. The longest string is determined by the number of characters in the text being printed.
Comments
Printing only the longest line
Report a typo
Write a program in Java 17
public class Main {
public static void main(String[] args) {
// System.out.println("Print it!");
// System.out.println("No, print it!");
/* System.out.println("Uncomment this line!");
System.out.println("Please, comment this line..... Wait! Is this the longest string?"); */
// System.out.println("Display this text!");
//// System.out.println("Do not comment it!");
}
}
___
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.