In our previous posts or you can say blog we have discuss about how can we get output in C#, C++. Now we shall discuss about how can we get Java Output or print something and then get output of that using a simple line of code okay.
![java output](http://codelikechamp.com/wp-content/uploads/INTRODUCTION-TO-PYTHON-9.jpg)
Now How can we Print Text for Java Output
You have learned from the previous post or blog you can say that you can use the println() method to output values or print text in Java:
Example:
System.out.println("Hello World!!!");
Output
Hello World!!!
NOTE: We can print text or number or values on screen by two ways using Print() method and Println() method also.
Now let’s try both method and see difference in their output okay
Print() Method for Java Output
Now we can print our text or number to screen using this method. See code or syntax of this line under below:
System.out.print("Hello buddy, Codelikechamp is great website to learn programming!!"); System.out.print("Oh!! really thanks for sharing");
Output
Hello buddy, Codelikechamp is great website to learn programming!!Oh!! really thanks for sharing
Now we use Println() method and see the output:
Println() Method
It’s serves same funtionality i.e for printing , but one thing is different let see :
System.out.print("Hello buddy, Codelikechamp is great website to learn programming!!"); System.out.print("Oh!! really thanks for sharing");
Output
Hello buddy, Codelikechamp is great website to learn programming!! Oh!! really thanks for sharing
NOTE: That Print() & Println() both methods print our text but Print() methods does not insert new line while Println() methods inserts okay this is the main difference i hope you got it.
Print Numbers
we can also print numbers to our screen using these methods.
NOTE: However, unlike text, we don’t put numbers inside double quotes, because numbers have different datatype i.e String .
System.out.println(1); System.out.println(10); System.out.println(100)
Output
1 10 100
Now in next blog or post we will discuss about comments in Java how to create it or what is the purpose of comments okay.
Link: https://Codelikechamp.com
Medium Link: Follow me on Medium
Linkedin Link: Follow me on Linkedin
I all the time emailed this website post page to all my friends, because if like to read it
next my links will too.
Hey excellent website! Does running a blog like this take a
lot of work? I’ve no knowledge of computer programming however
I was hoping to start my own blog in the near future. Anyhow, should
you have any recommendations or techniques for
new blog owners please share. I know this is off subject nevertheless I just had to ask.
Cheers!
thanks buddy advice is consistency and do quality work and not give up
Hi there, after reading this awesome post i am also delighted to share
my familiarity here with mates.
thanks tell them also that i am doing work on data structure so be ready i will share with you also just register to my site o you can be notified instantly
Hi there, just wanted to mention, I enjoyed this article.
It was inspiring. Keep on posting!
thanks buddy
Good day! I could have sworn I’ve been to this site before but
after checking through some of the post I realized it’s new to me.
Nonetheless, I’m definitely glad I found it and I’ll be bookmarking and checking back often!
thanks buddy you know i am working on data structure currently
Hey are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get
started and create my own. Do you need any coding expertise to make your own blog?
Any help would be greatly appreciated!
mean you want to create your own blog
Everyone loves what you guys are usually up too.
Such clever work and reporting! Keep up the superb works guys I’ve incorporated
you guys to my personal blogroll.
thank buddy i am working on data structure so just follow data structure and enjoy reading beautiful article thanks for support and share with your relatives
of course like your web-site but you have to take a look at
the spelling on quite a few of your posts. Many of them are rife with spelling problems and I in finding it very troublesome to inform the truth however I will certainly come back again.