Advertisement
alicemiriel

Untitled

Mar 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package pl.sda.typygeneryczne;
  2.  
  3. public class Generyki<T> {
  4.  
  5.  
  6.     public static <T> void wypisz10Razy(T obiekt) {
  7.         for (int i = 0; i < 10; i++) {
  8.             obiekt.toString();
  9.         }
  10.     }
  11. //    public static <T> void wypiszRazy(T obiekt ...) {
  12. //        for (int i = 0; i < 10; i++) {
  13. //            obiekt.toString();
  14. //        }
  15. //    }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement