如何为这个等式编写语义树

时间:2014-12-08 11:54:31

标签: java

如何为这样的等式编写语义树: x = y + 5

在java中:

public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println("Please Enter Your String");
    String x = sc.nextLine();
    for (int j = 0; j < x.length(); j++) {
        char m = x.charAt(j);
        System.out.println("Level "+(j+1)+" is "+m);
    }
}

0 个答案:

没有答案