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

/*
 * Variables.java
 *
 * Created on June 30, 2004, 11:24 AM
 */

package examples.advanced;

import java.util.*;

/**
 *
 * @author  cincura
 */
public class Variables {
    
    public String Vpublic = "Public Variable";
    protected String Vprotected = "Protected Variable";
    private String Vprivate = "Private Variable";
    String VpackagePrivate = "Package-private Variable";   
    public static String Spublic = "Public Variable";
    protected static String Sprotected = "Protected Variable";
    private static String Sprivate = "Private Variable";
    static String SpackagePrivate = "Package-private Variable";    

    /** Creates a new instance of Variables */
    public Variables() {
        Class clazz=java.lang.Runtime.class;
        String string="Hi!";
        int n=50;
        List llist=new LinkedList();
        List alist=new ArrayList();
        List vec=new Vector();
        Map hmap=new HashMap();
        Map htab=new Hashtable();
        Map tmap=new TreeMap();
        Set hset=new HashSet();
        Set tset=new TreeSet();
        for (int i=0; i
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.