Use underscores in literals to improve code readability in Java
Description
The following code shows how to use underscores in literals to improve code readability.
Example
public class Main {
public static void main(String[] args) {
long debitCard = 1234_5678_9876_5432L;
System.out.println("The card number is: " + debitCard);
}/*from www .j ava2s. c om*/
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »