Hi ,all
in this code ,i read filename in package filename using path ,,now i want to read the file B.java that also exist in package filename and relationship between them is inhretance.. "extends" keyword.
in this (public class filename extends B ),
but not write B.java in path ,i want to read any file after extends keyword in program filename.
can anyone help me.
i mean i want to read any file.java that come after extends keyword.
public class CyclomaticComplexity{
public static void main(String[] args) {
try {
fileName = "C:\\NetBeansProjects\\filename\\src\\filename\\filename.java");
FileReader fr = new FileReader(fileName);
BufferedReader br = new BufferedReader(fr);
line = br.readLine();
while (line != null) {
line = br.readLine();
}
}
catch (IOException e) {
e.printStackTrace();
}} }
//////////////////////////////
///filename program is
public class filename extends B
{public static void main(String[] args) {
int s=9;
s=s+1;
}......