+ 1

I just started java and am stuck. Someone help me please đŸ„ș

I've been trying to run the code for the "welcome to java" under practice (its the first work for practice under java) but i'm not getting it right. I'm getting the output right but not the input. Pleas can someone put me through it

20th Jan 2021, 4:15 PM
Justin Favour
Justin Favour - avatar
6 Answers
+ 10
public class Main { public static void main(String[] args) { System.out.print("Welcome to Java"); } } Try this, and check ☑ your code again. Don't worry, it's common with beginners. All the best
20th Jan 2021, 4:24 PM
Abhiyantā
Abhiyantā - avatar
+ 7
Shoaib Jamal ,you can try it, it's correct but I am not wrong. System.out.print() - prints a statement without leaving a line System.out.println() - prints a statement with leaving a line. Difference between Sop and Sopln - https://code.sololearn.com/c7AcNBj52vH3/?ref=app
21st Jan 2021, 10:57 AM
Abhiyantā
Abhiyantā - avatar
+ 5
Don't worry. Post your code here we'll help you to get through. 😊
20th Jan 2021, 4:16 PM
Zohaib 👑
Zohaib 👑 - avatar
+ 2
Rishav you forgot something in your code... It should be "System.out.println" instead of "System.out.print" Your code won't work if you don't add "ln" after print.
21st Jan 2021, 7:46 AM
Shoaib Jamal
Shoaib Jamal - avatar
+ 1
Okay thanks guys!
20th Jan 2021, 4:34 PM
Justin Favour
Justin Favour - avatar
+ 1
Rishav yes you are right thank you..
21st Jan 2021, 7:19 PM
Shoaib Jamal
Shoaib Jamal - avatar