谁能帮我看看我输的这段JAVA源程序哪有错误?

来源:百度知道 编辑:UC知道 时间:2024/05/25 01:35:28
public class FunctionCallTest
{
public static void main(String args[])
{
System.out.println("调用类内部方法");
inner_public_method();
inner_protected_method();
inner_private_method();
//不能用这种方式调用其他类中的方法
//outer_public_method();
System.out.println("\n 通过对象调用其他类中的方法");
FunctionCallTest a=new FunctionCallTest();
a.inner_public_method();
a.inner_protected_method();
a.inner_private_method();
Another b=new Another();
b.outer_public_method();
b.outer_protected_method();
//b.outer_private_method();
System.out.println("\n 通过类名调用方法");
FunctionCallTest.inner_public_method();
Another.outer_static_method();
System.out.println("\n 前面的方法调用都是程序显式调用(除第九行数除外)");
System.out.println("下边的是一个声明对象的过程中,需要系统自动调用类的构造函数");
Another c=new Another();
}
pubiic static void inner_public_meth

pubiic static void inner_public_method()[这段有错误 电脑提示的是在public static间加标识符
这里的 public 去掉!

还有这里
class Another
{
Another();

改成
class Another
{
Another()
{
}

pubiic static void inner_public_method()[这段有错误 电脑提示的是在public static间加标识符 可我不知道该加什么标识符啊]
pubiic 应该是public把
public static void inner_public_method()
你的代码好像是反编译的