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.
April 24, 2008 at 7:43 pm
I returned the favor and linked back to this blog. It is alphabetical under /.
April 25, 2008 at 2:54 am
Its my Pleasure , to be on Renegade Eye blogroll