4

How to use final in static class? Which way is true ?

private final static class 

or

private static final class
user2864740
  • 60,010
  • 15
  • 145
  • 220
mstfdz
  • 2,616
  • 3
  • 23
  • 27

2 Answers2

11

You can use any. No Problem. Nothing wrong and there is no order. as a standard we are using this as private static final class but again there is nothing wrong of using both.

Lasitha Benaragama
  • 2,201
  • 2
  • 27
  • 43
2

Either of them is fine. There is no real difference, although there is no such thing as static class in java.

Have a look at this post to know how to make a class static.

Community
  • 1
  • 1
anirudh
  • 4,116
  • 2
  • 20
  • 35