小编mar*_*iam的帖子

缺少return语句错误,我不知道错误是什么

这是代码,

class Car
{
    public static String owner;
    public static String car;
    public static Integer plate_num;
    public static String car_color;

    Car(String owner, String car_name, Integer num, String color)
    {
        owner = owner;
        car = car_name;
        plate_num = num;
        car_color = color;
    }

    Void display ()
    {
        System.out.println("The owner of the car is  "+ owner + "and Car model is " + car);

        System.out.println("The  car number is  "+ plate_num + "and Car color is " + car_color);
    } // ---> here …
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
587
查看次数

找不到symble ...为什么?

class A 
{

    int i,j;

    A (int x, int y) 
    {

        i = x;
        j = y;
    }

    void show()
    {

        System.out.println("the value of i and j are " + i + " " + j);
    }
}

class B extends A // here is the error

{
    int k;

    B (int z, int a, int b ) 
    {

        k = z;
        i = a;
        j = b;
    }

    void display()
     {

        System.out.println("the value of  k is " +k);
    } …
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
98
查看次数

标签 统计

java ×2