Java小程序排错

59关注609浏览

class Method
{
Method(int x1,int y1)

{ int x,y;
x=x1;
y=y1;

}
}
public class Exam
{
public static void main(String agrs[])
{
Method m=new Method(10,20);

展开全部
收起
3回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Skylar

    12人对此回答表示赞同

    class Method {
    int x, y;

    Method(int x1, int y1) {
    x = x1;
    y = y1;
    }
    }

    public class Exam{
    public static void main(String agrs[]) {
    Method m = new Method(10, 20);
    System.out.println(
    展开
    12
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 肆无忌惮

    10人对此回答表示赞同

    class Method
    { int x,y;//注意这里应该是这样
    Method(int x1,int y1)

    {
    x=x1;
    y=y1;

    }
    }
    public class Exam
    {
    public static void main(String agrs[])
    {
    Method m=new Method(10,20);
    展开
    10
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • Tavis

    1人对此回答表示赞同

    class Method
    {int x;//
    int y;//把构造函数的int x,y;放到外面来
    Method(int x1,int y1)

    {
    x=x1;
    y=y1;

    }
    }
    public class Exam
    {
    public static void main(String agrs[])
    {
    Method m
    展开
    1
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部