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 import_in;

import import_use.List;
import java.io.File;
import java.util.ArrayList;
import java.util.Map;
import static java.lang.Math.PI;

public class Provider {
	public File useAsReturn() {
		return null;
	}
	public void useInArgument(File file) {
		file= null;
	}
	public void useInDecl() {
		List list= null;
	}
	public int useInDecl2(){
	  return new ArrayList().size();
	}	
	public Object useInDecl3(){
	  return new java.util.HashMap();
	}	
	public void useInClassLiteral() {
		Class clazz= File.class;
	}
	public void useArray() {
		List[] lists= null;
	}
	public void useInLocalClass() {
		class Local extends File {
			private static final long serialVersionUID = 1L;
			public Local(String s) {
				super(s);
			}
			public void foo(Map map) {
			}
			public void bar(Byte b) {
			}
		}
	}
	public void useStaticImport() {
		double i= PI;
	}
}
... 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.