Demo entry 6349828



Submitted by anonymous on Feb 28, 2017 at 12:18
Language: Java. Code size: 462 Bytes.


import java.lang.reflect.Proxy;

final class Client {

	public static void main(String[] args)  throws Exception{
		// TODO Auto-generated method stub
		Subject realSubject = new RealSubject();
		Subject proxy = (Subject) Proxy.newProxyInstance(Subject.class.getClassLoader(),
				new Class[]{Subject.class}, 
				new ProxyHandler(realSubject));
		int a = proxy.sum(1,2);


This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).