I do not execute the desired program

-2

I tried to execute this program and I do not know why it does not execute me. I would like someone to tell me why this error is due ... I tried another PC and when I ran the program I said "You can not launch this program because there are no available releases" I would appreciate it if you answered please. Thank you. I'm working with Eclipse.

    
asked by Miguel Angel Vera Diaz 05.11.2018 в 22:39
source

1 answer

0
/**
 * @author dejuanfran
 *
 */
public class Empleado {

    public static double salario;
    public static String nombre= "Alex";

    public Empleado() {

    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

        Empleado.salario=1000;
        System.out.println("El empleado "+Empleado.nombre+ " tiene un salario de "+Empleado.salario);
    }

}

This code works perfectly I think that is what you needed, I recommend that you start to create the attributes of the private objects and make use of the getters and setters.

I think your mistake was that the main one was inside an EmpDemo class but I can not tell you for sure.

I hope I have served you.

    
answered by 06.11.2018 / 09:46
source