+ 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
6 Respostas
+ 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
+ 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
+ 5
Don't worry. Post your code here we'll help you to get through. 😊
+ 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.
+ 1
Okay thanks guys!
+ 1
Rishav yes you are right thank you..