[code]Write a program that inputs a Java source code file and outputs a copy of that file with Javakeyboards surrounded with HTML tags for bold type. For example this input:
public class JavaSource
{
public static void main ( String[] args )
{
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");
}
}
will be transformed into:
[b]public[/b] [b]class[/b] JavaSource{
[b]public[/b] [b]static[/b] [b]void[/b] main ( String[] args ){
[b]if[/b] ( args.length == 3 )[b]new[/b] BigObject();[b]else[/b]System.out.println("Too few arguments.");
}
}
In a browser the code will look like this:
public class JavaSource
{
public static void main ( String[] args )
{
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");
}
}
[/code]
Comments
Leave a comment