How to print custom string in Java?

Question: How do I modify the following code snippet so that it outputs"Welcome to the Mesozoic Eden

Repl link:

public class Main{
public static void main(String[] args)
{
System.out.println("Hello world") ;
}
}

Hi @tefomongale9466 !
You just need to change the string in System.out.println():
From:

to:

System.out.println("Welcome to the Mesozoic Eden") ;

Hope this helps!

4 Likes

I see that you now have an error caused by having a file (Welcome to…) that contains spaces in it. I would simply remove that file and instead code in Main.java. Currently the run button can only be configured to run one file.

2 Likes