Package internal

Source Code of internal.ExtrernalMain

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package internal;

import internal.External;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author Конарх
*/
public class ExtrernalMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            External.ABHolder holder = new External.ABHolder();
            holder.a = 10;
            holder.b = 13;
            final External ext = new External(holder);
            holder = ext.getHolder();
            System.out.printf("a=%d b=%d\n", holder.a, holder.b);
            holder.a = 5;
            holder = ext.getHolder();
            System.out.printf("a=%d b=%d\n", holder.a, holder.b);
            External.Pavlik p = ext.getPavlik();
            p.setA(34);
            holder = ext.getHolder();
            System.out.printf("a=%d b=%d\n", holder.a, holder.b);
            p = ext.getShtirlits();
            p.setA(34);
            holder = ext.getHolder();
            System.out.printf("a=%d b=%d\n", holder.a, holder.b);
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
    }
}
TOP

Related Classes of internal.ExtrernalMain

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.