Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.*;

public class Main {
    public static Vector createFieldList(String strFieldList, String strSeparator) {
        // Build field list
        Vector vtFieldList = new Vector();
        String strFieldName;
        int iIndex = 0;
        int iLastIndex = iIndex;
        while ((iIndex = strFieldList.indexOf(strSeparator, iLastIndex)) >= 0) {
            strFieldName = strFieldList.substring(iLastIndex, iIndex);
            vtFieldList.add(strFieldName);
            iLastIndex = iIndex + 1;
        }
        strFieldName = strFieldList.substring(iLastIndex, strFieldList.length());
        vtFieldList.add(strFieldName);
        return vtFieldList;
    }
}