Advertisement
blackpab

Zestaw 9 - Zadanie 3 - STOS - Domowe

May 22nd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package javaapplication5;
  7.  
  8. /**
  9.  *
  10.  * @author student
  11.  */
  12. public class Stos<T> {
  13.  
  14.     T[] tab;
  15.     int n=0; //liczba el. na stosie //mozna tez uzywac go jako indeksu talbicy
  16.  
  17.     void push(T e) {
  18.         try {
  19.             tab[n] = 1;
  20.                        
  21.  
  22.         } catch (Exception ex) {
  23.  
  24.         }
  25.  
  26.     }
  27.  
  28.     void pop(T x) {
  29.  
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement