package com.lei;
public class RenWu2 {
private String name="java学习";
public void k(){
class Renwu{
int book=3;
public int a (){
return book+3;
}
}
RenWu i=new RenWu();
int books=i.a();
System.out.println(name+ "/n" +books);
}
public static void main(String[]args){
RenWu2 j=new RenWu2();
j.k();
}
}
/n应该写成\n
哈哈,我曾经也犯过这种毛病!
给你个建议,最好把类名什么的用英文写出来,养成好习惯
找到原因了 RenWu大小写没看见