Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package latihan30;
- import java.text.NumberFormat;
- import java.util.Locale;
- /**
- *
- * @author steven
- */
- public class Persen1 {
- public static void main (String[] args){
- Locale indonesiaLocale = new Locale.Builder().setLanguage("in").setRegion("ID").build();
- int amount = 100;
- int amount2 = amount/100;
- NumberFormat persen = NumberFormat.getPercentInstance(indonesiaLocale);
- System.out.println("Indonesia Persen: " + persen.format(amount2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement