Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Wyklad2_Interface;
- public class Tablica {
- Object tablica[];
- int rozmiar;
- int wypelnienie;
- public Tablica(){
- this.rozmiar = 1;
- this.wypelnienie = 0;
- tablica = new Object[this.rozmiar];
- }
- public void dodaj(Object obj){
- if(wypelnienie == rozmiar)
- System.out.println("Tablica pelna");
- else{
- tablica[wypelnienie] = obj;
- wypelnienie++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement