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 {
    private static final Map<Character, Character> H2Z = new HashMap<Character, Character>();

    public static String toZenkanaCase(String str) {
        StringBuilder buffer = new StringBuilder(str);

        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if (H2Z.containsKey(c)) {
                buffer.setCharAt(i, H2Z.get(c));
            }
        }

        return buffer.toString();
    }
}