Syntax sorting in Java

The following two syntax sequences are valid in Java Why are both allowed and is there a preferred syntax order?

private final static String consultantType = "consultantType";
  private static final String consultantId = "consultantId";

Solution

Allow any order, because the limited order has no value, so why bother to remember the programmer's false sorting?

No matter which order you use, it makes no difference Choose the one you like, use it consistently, and then move on to a more interesting question

For its value, I think "private static finals" may be more common

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>