Wednesday, November 14, 2018

Difference between WriteLine() and Write() method


The main difference between WriteLine() and Write() is that the Write() method only prints the string provided to it, while the WriteLine() method prints the string and moves to the start of next line as well.
Let's take at a look at the example below to understand the difference between these methods.

Example 1: How to use WriteLine() and Write() method?

When we run the program, the output will be


Thank you

No comments:

Post a Comment