alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

package p;

class TestDelegateCreationA {
	int b;
}

public class TestDelegateCreationCodeStyle extends TestDelegateCreationA{
	String a[];
	public static class FooParameter {
		private String[] fAG;
		private int fBG;
		private double newD;
		public FooParameter(String[] a, int b, double newD) {
			fAG = a;
			fBG = b;
			this.newD = newD;
		}
		public String[] getA() {
			return fAG;
		}
		public void setA(String[] a) {
			fAG = a;
		}
		public int getB() {
			return fBG;
		}
		public void setB(int b) {
			fBG = b;
		}
		public double getNewD() {
			return newD;
		}
		public void setNewD(double newD) {
			this.newD = newD;
		}
	}
	/**
	 * @deprecated Use {@link #foo(FooParameter)} instead
	 */
	public void foo(String[] a, int b, double d){
		foo(new FooParameter(a, b, d));
	}
	public void foo(FooParameter parameterObject){
		double d = parameterObject.getNewD();
		int b = parameterObject.getB();
		String[] a = parameterObject.getA();
		a=new String[0];
		d=5.7;
		b=6;
	}
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.