Skip to content
Advertisement

Problem at calling a constructor if the java class is in a different path

I want to save the java classes in a folder called Classes, so on NetBeans, I have created that folder, and then I have saved it the class called Jugadores.java but after doing that i am having issues to call my constructor called regisPlayer on the main class. NetBeans says that:

cannot find the simbol
symbol:class regisPlayer

location: class Obligatorio

This is my main class

JavaScript

This is my class Jugadores.java

JavaScript

I do not what it could be the problem, I am learning Java. I have tried to solve the problem adding the name package obligatorio.classes in Jugadores.java to then call it on my main class but I did not work.

Advertisement

Answer

JavaScript

Used like this :

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement