View RSS Feed

All Blog Entries

  1. Factory Pattern Example

    by , 03-04-2012 at 09:10 PM
    Java Code:
    package factoryPattern2;
    
    public abstract class Product {
    	
    	private String productName;
    	
    	public void setName(String name) {
    		this.productName = name;
    	}
    	
    	public String getName() {
    		return productName;
    	}
    
    	public void putInABox() {
    		System.out.println("Putting the product in a box..");
    	}
    
    }
    
    
    package factoryPattern2;
    ...
    Categories
    Uncategorized
Page 17 of 48 FirstFirst ... 7151617181927 ... LastLast