How do I get currency symbol?

package org.kodejava.util;

import java.util.Currency;
import java.util.Locale;

public class CurrencySymbol {
    public static void main(String[] args) {
        Currency currency = Currency.getInstance(Locale.JAPAN);
        System.out.println("Japan = " + currency.getSymbol());

        currency = Currency.getInstance(Locale.UK);
        System.out.println("UK = " + currency.getSymbol());

        currency = Currency.getInstance(Locale.US);
        System.out.println("US = " + currency.getSymbol());

        currency = Currency.getInstance(new Locale("in", "ID"));
        System.out.println("Indonesia = " + currency.getSymbol());
    }
}

The result of the code snippet above:

Japan = ¥
UK = £
US = $
Indonesia = IDR

How do I create mouse event using Robot class?

In this example we are automating the process of creating mouse event using the java.awt.Robot class.

package org.kodejava.awt;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;

public class MovingMouseDemo {
    public static void main(String[] args) {
        try {
            Robot robot = new Robot();

            // Move mouse cursor to 200, 500
            robot.mouseMove(200, 500);

            // Press the mouse button #1.
            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);

            // Scroll the screen down for a mouse with a wheel support.
            robot.mouseWheel(150);
        } catch (AWTException e) {
            e.printStackTrace();
        }
    }
}