Hi. I am last year MBA student. Currently I am learning java programming language. I want to show number in specific format. If you have any codes then send it to me. It is highly appreciated.
Hi. I am last year MBA student. Currently I am learning java programming language. I want to show number in specific format. If you have any codes then send it to me. It is highly appreciated.
I suggest you to refer following example of NumberFormat and DecimalFormat class, which will give you something idea about the use of this class:
Code:import java.text.DecimalFormat; import java.text.NumberFormat; public class DecimalFormat { public static void main(String[] args) { NumberFormat F1 = new DecimalFormat("#0.00"); System.out.println(M); System.out.println(F1.format(M)); } }
Bookmarks