Menu
Question Index
...

What will be the output of the following program?

import java.text.*;
import java.util.*;
public class NumberPrint {
    public static void main(String[] args) {
        Locale loc = new Locale("ar");
        double number = 0.25;
        NumberFormat number_number = NumberFormat.getPercentInstance(loc);
        String str = number_number.format(number);
        System.out.println(str);
    }
}


25ar
0.25ar
ar
25
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Other Advanced Topics In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App