All pastes #826292 Raw Edit

Unbenannt

public java v1 · immutable
#826292 ·published 2007-12-21 03:02 UTC
rendered paste body
package fooapp;public class Main{    public static void main(String[] arg)    {        String Text = "EUROautoarmearmeecke autoarmearmename postmondnoteautomamamamanamebonn";        String res = "";        String[] foo = Text.split(" ");        int anz = 1;        for (int i = 0; i < foo.length; i++)        {            String teil = foo[i];            for (int i2 = 0; i2 < teil.length(); i2++)            {                res = res + teil.charAt(i2);                if (anz == 4)                {                    anz = 0;                    if (res.equalsIgnoreCase("EURO"))                    {                        System.out.print("H");                    }                    if (res.equalsIgnoreCase("auto"))                    {                        System.out.print("a");                    }                    else if (res.equalsIgnoreCase("arme"))                    {                        System.out.print("l");                    }                    else if (res.equalsIgnoreCase("ecke"))                    {                        System.out.print("o");                    }                    else if (res.equalsIgnoreCase("name"))                    {                        System.out.print("e");                    }                    else if (res.equalsIgnoreCase("post"))                    {                        System.out.print("z");                    }                    else if (res.equalsIgnoreCase("mond"))                    {                        System.out.print("u");                    }                    else if (res.equalsIgnoreCase("note"))                    {                        System.out.print("s");                    }                    else if (res.equalsIgnoreCase("mama"))                    {                        System.out.print("m");                    }                    else if (res.equalsIgnoreCase("bonn"))                    {                        System.out.print("n");                    }                    res = "";                }                anz++;            }            System.out.print(" ");        }            }}