Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getAddressXml(String street, String city, String state, String zip, String phone) {
        StringBuffer buffer = new StringBuffer();
        buffer.append("<address>");
        buffer.append("<street>" + street + "</street>");
        buffer.append("<city>" + city + "</city>");
        buffer.append("<state>" + state + "</state>");
        buffer.append("<zip>" + zip + "</zip>");
        buffer.append("<phone>" + phone + "</phone>");
        buffer.append("</address>");

        return buffer.toString();
    }
}