Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.StringTokenizer;

public class Main {
    public static String tag(String inString) {
        return "<" + inString + ">";
    }

    public static String tag(String inElement, String inString) {
        StringTokenizer wkTok = new StringTokenizer(inElement, " ");
        String wkElementOnly = inElement;
        wkElementOnly = wkTok.nextToken();
        return tag(inElement) + inString + etag(wkElementOnly);
    }

    public static String etag(String inString) {
        return "</" + inString + ">";
    }
}