Help me in solving SYNJ4V2 problem

My issue

can anyone understand the logic of this output :- 73

My code

class CodeChef
{
	public static void main (String[] args)
	{
		System.out.print(3 + 4);
		System.out.print(2 + 1);
	}
}

Learning course: Learn Java
Problem Link: CodeChef: Practical coding for everyone

@kaif49490 Output of first print statement (3+4) is 7… and output of second print statement (2+1) is 3… so its output is 73 because you haven’t given next line or any space so both 7 and 3 are printed together.

1 Like

Thank you

1 Like