Está en la página 1de 2

CLASES

FUNDAMENTO DE LAS CLASES


FORMA GENERAL DE UNA CLASE Class nombre clase{ tipo variable_instancia1; tipo variable_instancia1; tipo variable_instanciaN; tipo metodo1(lista_parametros){ //cuerpo_metodo } tipo metodo2(lista_parametros){ //cuerpo_metodo } .. tipo metodoN(lista_parametros){ //cuerpo_metodo }

DEXLRACIN DE OBJETOS Una forma : nombre _clase nombre _objeto; nombre _objeto =new nombre _clase(); Otra forma: nombre _clase nombre _objeto= new nombre _clase(); clase objeto=new objeto clase(); estudiante miestudiante1=new estudiante();

También podría gustarte