Notes
Herencia
Content of the notes (1)
Page 1
import javax.swing.JFrame;
public class Herencia extends JFrame{
public Herencia(){ //Sin void para este metodo,constructor. Se llama igual que la clase pero con diferencias
this.setBounds(0,0,200,100);
this.setVisible(true);
}
public static void main(String args[]){
//JFrame ventana=new JFrame();
Herencia ventana=new Herencia(); //Llamamos al constructor
Herencia ventana2=new Herencia();
Herencia ventana3=new Herencia();
}
}
EXTRA:
Es como una funcion
Information
- Description
- Note on Herencia, created by MOLINA OLVERA SANTIAGO on 19/09/2025.
- Created by
- MOLINA OLVERA SANTIAGO
- Views
- 0
- Rating
More on Herencia y polimorfismo