What is difference between printf and scanf?



What is difference between printf and scanf?..

Answer / Sri Ram Yadav

"printf is a formatted print statement in C/C++, whereas scanf is its counterpart for reading user input. In Java, equivalent methods are System.out.println() and Scanner.nextLine() respectively."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Does java runtime require a license?

1 Answers  


Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread is released from lock. Explain types of lock(like method level and block level) in thread.

1 Answers  


what is stringtolennizer with example?

2 Answers   Symphony,


What do you mean by append?

1 Answers  


why interfaces are faster than abstract classes?

4 Answers  


Explain enumeration in java?

1 Answers  


How infinite loop is declared?

1 Answers  


Can we have try without catch block?

1 Answers  


different types of threads?

18 Answers   TCS,


What is java autoboxing?

1 Answers  


What is hashset in java?

1 Answers  


What is quick sort in java?

1 Answers  


Categories