In Java, is it possible to generate the corresponding curly brace for a sample of Java source code, given the source code as a string, as well as the start of the curly brace?
public class FindFunctionStartAndEnd{
public static Object findCorrespondingCurlyBrace(String sourceCode, string startingPosition){
//return the string position that corresponds to the matching curly brace
//the input string should be the source code of a Java class
//if sourceCode is not valid Java code, return false
}
}