the programming language c allows statements of the form include filename which duri 5192345
The programming language C allows statements of the form #include filename which, during compilation of your code, causes the preprocessor to insert the contents of filename in the place of the include statement. Include statements may be nested – in other words, the file filename may itself have include statements. Obviously, a file cannot include itself.
Write a Java program that reads in a file and outputs the file as modified by the include statements.
I understand that I'll need to implement this recursively and that I need to keep track of files that have already been read and included to avoid infinite loops. I just don't know where to begin trying to implement this C feature in terms of Java.