Try to answer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Try to answer

Java topic

26th Aug 2017, 1:10 AM
Bharath
Bharath - avatar
3 Answers
+ 1
The System.out.println() method doesn't return anything I.E. it returns void! This means that you can't pass it to the method itself as there isn't any overloaded version of the method that will accept a void type as an argument. https://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html#println()
26th Aug 2017, 1:27 AM
ChaoticDawg
ChaoticDawg - avatar
0
void type not allowed..error
26th Aug 2017, 1:10 AM
Bharath
Bharath - avatar
0
Error, because you can't nest printing System.out.println() in Java. You can nest print statements in Python... https://code.sololearn.com/cQ07MzpV2l9b/?ref=app
26th Aug 2017, 5:07 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar