Print to console without using semi colon

By Jasdeep Singh in Programming

April 24, 2008

One of my friend asked : “How can one write to console without using semi colon in Java ?”. I tried many work-arounds . Even Googling did net help much .

I thought i should raise an exception some how thats it some thing will be written on the console. Naa , its did not work well.

Then a stupid workaround was to enable the verbose argument , thats it every class loaded in the JVM is traces on console.

The some how i tried real tricks to print my name on console ,

This is what i got,

 `public class Test {

 public static void main(String a[]){

 if ( System.out.append("jasdeep") instanceof Object ){` 

 `}
         }
  }` 
You might be wondering , why i did not use _System.out.println()_ . Because it does not return anything , So it can not be compared in if block.

_Crossposted from [https://jasdeepsingh.wordpress.com/2008/04/24/print-to-console-without-using-semi-colon/](https://jasdeepsingh.wordpress.com/2008/04/24/print-to-console-without-using-semi-colon/)_



Comments:

Renegade Eye -

I returned the favor and linked back to this blog. It is alphabetical under /.


#### [Jasdeep](http://jasdeepsingh.wordpress.com/ "jsbhangra@gmail.com") -

Its my Pleasure , to be on Renegade Eye blogroll


#### [herbal colon cleanse](http://www.detoxreviews.com "dannie3@hotmail.com") -

i get it now.. thanks! -Anne


#### [Rolland](http://www.xfire.com/blog/karadunaway/4442014/ "rollandwilber@gawab.com") -

I know this if off topic but I’m looking into starting my own blog and was curious what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web savvy so I’m not 100% positive. Any tips or advice would be greatly appreciated. Appreciate it


#### [Jasdeep](http://jasdeepsingh.wordpress.com/ "jsbhangra@gmail.com") -

Rolland, On the contrary, Having a blog like mine would not cost you a single penny. just go to wordpress.com, Sign up and start writing your posts. It’s just like email, just that your ever email is public. Regards, Jasdeep


#### [puracleansereview.com](http://blogs.albawaba.com/kasha94f/104868/2013/02/11/590410-how-beneficial-is-a-pure-colon-cleanse "ricky.hargrave@gmail.com") -

Thanks to my father who stated to me about this blog, this website is actually remarkable.


Posted on:
April 24, 2008
Length:
2 minute read, 336 words
Categories:
Programming
See Also: