mercredi 19 avril 2017

Why this code calling a method from another class doesn't work

public class TestIdiots
{
    public void goToHell()
    {
        System.out.println("This is stupid");
    }
}

public class DoIdiots
{

    public static void main(String[] args)
    { 
        TestIdiots retard = new TestIdiots();
        retard.goToHell(); 
    }
}

The error message is DoIdiots.java:7: error: cannot find symbol TestIdiots retard = new TestIdiots(); ^ symbol: class TestIdiots location: class DoIdiots DoIdiots.java:7: error: cannot find symbol TestIdiots retard = new TestIdiots(); ^ symbol: class TestIdiots location: class DoIdiots 2 errors

Many thanks






Comments
0 Comments

0 commentaires:

Enregistrer un commentaire