View Single Post
Old 25-09-2005, 14:26   #3
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: Quine - self replicating code

I done it in java, although I am not convinced it is an exact replica, but it is close.

I was thinking about also finding the file and echoing the file to the screen, not sure if this is against the rules?

Code:
class QuineTest
{
	public static void main(String [] args)
	{
		char x = 32;
		System.out.println(y+x+';'+'}');
	}
	static String y ="class QuineTest{ public static void main(String [] args){ char x = 34; System.out.println(y+x+';'+'}');} static String y =";
	
}
although my code to make it work is not on the same line, I thought it would be easier this way, but you know it can be all put on the same line.

ik
ikthius is offline   Reply With Quote