public class Test1 { public static void main(String args[]) { System.out.println(getLineInfo()); getExp(); } public static String getLineInfo() { StackTraceElement ste = new Throwable().getStackTrace()[1]; return ste.getFileName() + ": Line " +
说到递归,java中的递归和C语言中也是很相似的,在Java中,递归其实就是利用了栈的先进后出的机制来描述的. public class HelloWorld { public static void main(String[] args){ // Scanner s = new Scanner(System.in); // System.out.println("请输入一个数字"); // int num = s.nextInt(); int c = 10 , d = 20 ; sw