More about Java Output | System.out.print()

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

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

🤞 Don’t miss any latest posts!

Please subscribe by joining our community for free and stay updated!!!

IF YOU HAVE ALREADY SUBSCRIBED JUST CLOSE THIS FORM !

27 thoughts on “More about Java Output | System.out.print()”

  1. 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!

  2. 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!

  3. 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!

  4. 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.

  5. 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.

  6. Your style is so unique in comparison to other folks I’ve read
    stuff from. Thanks for posting when you’ve got the opportunity, Guess I’ll just
    bookmark this blog.

  7. Hi to every one, the contents existing at this web site are actually awesome for people knowledge, well, keep up the nice work fellows.

  8. I go to see day-to-day some websites and information sites to read
    articles, but this webpage offers quality based
    posts.

  9. Hi there! This post could not be written any better!

    Reading through this post reminds me of my previous roommate!
    He constantly kept preaching about this. I am going to
    forward this post to him. Fairly certain he’s going
    to have a very good read. Many thanks for sharing!

  10. I truly love your blog.. Excellent colors & theme. Did you develop this site yourself?
    Please reply back as I’m looking to create my very own blog and want
    to know where you got this from or what the theme is named.

    Cheers!

  11. Hello would you mind stating which blog platform you’re working with?

    I’m looking to start my own blog soon but I’m having a tough time making
    a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems
    different then most blogs and I’m looking for something completely
    unique. P.S My apologies for being off-topic but I had to ask!

  12. I loved as much as you will receive carried out right
    here. The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get bought an impatience over that you wish be delivering
    the following. unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you
    shield this increase.

  13. Hi, i think that i saw you visited my weblog thus
    i came to “return the favor”.I am trying to find things to
    enhance my web site!I suppose its ok to use a few of your ideas!!

  14. hello!,I love your writing very much! share we be in contact more approximately your post on AOL?

    I require an expert on this house to solve my problem.
    May be that’s you! Taking a look ahead to see you.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top