Tasks

Java Syntax
Level 3, Lesson 6
Available

"Hi, buddy. Here are a couple more tasks for today. To make them more challenging, I want you to only use variables inside the print/println method."

Tasks - 1

"Is that even possible?"

"Remember, Amigo: we robots can do the impossible and bend the unbendable."

Comments (105)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Dom Level 21, England, United Kingdom
10 August 2025
anyone else try StringBuilder result = new StringBuilder(string); result.deleteCharAt(4); result.deleteCharAt(14); result.deleteCharAt(19); return result.toString(); for deleting spaces or just me then you work it out then just feel stupid lol
Lunita Level 4, Dominican Republic
13 January 2023
For me the Epic was easier than the hard -_-
Lunita Level 4, Dominican Republic
13 January 2023
So we just have to place backslash \ before the " to print something in quotation marks…

System.out.println("Hola \"comillas\" codegym");
output:

Hola "comillas" codegym
Galax Level 10, Houston, United States
16 October 2022
Hi, I'm the 100th commentor. yay
20 September 2022
i thought by writing infinite loop i would destroy your website but anyway it didn't happen yo! My ultra pro funny mind😀
abhishe_kira Level 18, India Expert
18 June 2023
bruh!!!!!!!!!!
java-dev Level 4, Brazil
22 May 2022
Se eu definir um método em minha classe com o mesmo nome da classe, o método é chamado e executado automaticamente quando crio um novo objeto?

Red redColor = new Red();

public static class Red {
    public Red() {
        System.out.println("Red");
    }
}
Lunita Level 4, Dominican Republic
13 January 2023
Eu diria que sim
Mindre Mercedes Bautista Level 6, Rome, Italy
11 February 2022
ok se escribe asi: System.out.println( " \ " Hello \ " " );
Cleber Machado Level 4, São Luís, Brazil
11 October 2021
ok \\ == "\" \\\\ = "\\" this is not pretty 😂😂
AHMET YORULMAZ Level 8, Germany, Germany
7 October 2021
Weigh every word and always ask yourself whether what you want to say is true🙃
26 June 2021
A bear walks into a bar and says, “Give me a whiskey and … cola.” “Why the big pause?” asks the bartender. The bear shrugged. “I’m not sure; I was born with them.”