-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHint.java
More file actions
22 lines (20 loc) · 723 Bytes
/
Hint.java
File metadata and controls
22 lines (20 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
public class Hint {
public static void main(String[] args) {
System.out.println("Enter the Id");
// Hint - String class
Locale locale = new Locale("hi","IN");
NumberFormat nf = NumberFormat.getCurrencyInstance(locale);
double salary = 90000.20;
String formattedSalary = nf.format(salary);
System.out.println(formattedSalary);
Date date = new Date();
System.out.println(date);
DateFormat df = DateFormat.getDateInstance(DateFormat.FULL, locale);
String d = df.format(date);
System.out.println(d);
}
}