sergAccount

Untitled

Feb 14th, 2021
470
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 com.mycompany.ja11;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Main {
  13.    
  14.     public static void main(String[] args) {
  15.        
  16.         // Holder<T> h;
  17.          
  18.         Holder<String> h1;
  19.         Holder<Integer> h2;
  20.         // ..
  21.         Holder<Person> h3;
  22.        
  23.         // создаем объект типа Holder
  24.         Holder<Person> h4 = new Holder<>(new Person());
  25.         Person p1 = h4.getObj();
  26.        
  27.         Holder<String> h5 = new Holder<>();
  28.         String p5 = h5.getObj();
  29.        
  30.     }
  31.  
  32. }
  33.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×