+ 2
To all java beginers
whats the diffrent between println printif and print
3 odpowiedzi
+ 3
println() is used to print on new console line where as print() is used to not to print on new console line i.e. on same line.
+ 3
if by "printif" you mean "printf", it is used to print formatted text in console :D
for example:
System.out.printf("I %s %d apples", "have", 2);
this will print "I have 2 apples" in console. %s means a string goes here and %d means a decimal number goes here.
by the way, printf has more formatting options :D
+ 2
سلام