Tasks

New Java Syntax
Level 9 , Lesson 10
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."

9
Task
New Java Syntax, level 9, lesson 10
Locked
Literals
Data written directly in program code are called literals. This applies to values of primitives and the String type. In the Solution class, you need to create variables of each primitive type, as well as of the String type, and assign arbitrary values to them. The String variable must be initialized
9
Task
New Java Syntax, level 9, lesson 10
Locked
Deleting spaces
Implement the deleteSpaces(String) method so that all spaces are removed from the string received in the input parameter.
9
Task
New Java Syntax, level 9, lesson 10
Locked
Word palindrome
Implement the isPalindrome(String) method so that it checks whether the input word is a palindrome. A palindrome is a word that read the same in both directions. Don't consider whether the letters are uppercase or lowercase.
9
Task
New Java Syntax, level 9, lesson 10
Locked
The way of the Samurai
Display the following: 日本語
9
Task
New Java Syntax, level 9, lesson 10
Locked
Sam I Am
Display all possible combinations of the words "Sam", "I", "Am". Hint: There are 6 combinations. You need to display each combination on a new line. Do not separate the words. Example: IAmSam AmSamI ... Use either the System.out.printf() or String.format() method to generate the strings.
Comments (104)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
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.”
Victor Level 6, Buenos Aires, Argentina
29 April 2021
The way of the Samurai : The task was created by top specialists as part of Japanese language ジャジャジャ
Jonaskinny Level 25, Redondo Beach, United States
10 February 2022
That moment when you finish coding the recursive (int) casting looping call to capture unicode to then print out in UTF-16 and then ... System.out.println lol