Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 158755

Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.

1 vote

Is "static interface" a good practice?

As stated in the question, the interface is not meant to be implemented (or instantiated). So we could compare it with a class that has a private constructor: The class can't be extended with no sup …
Vlasec's user avatar
  • 281
13 votes
5 answers
8k views

Is "static interface" a good practice?

I've just recently noticed there is an option to have static methods in interfaces. Same as with static fields of interface, there is an interesting behavior: These are not inherited. I'm unsure it's …
Vlasec's user avatar
  • 281
-1 votes

Best practice Java - String array constant and indexing it

As for your question - it is unclear what exactly you want to achieve, but I could just give you some general advices about using enum: An enum constant is an object and enum class name should start …
Vlasec's user avatar
  • 281
0 votes

One Enum vs Multiple Enums

I think the way you want to split it into multiple enums is not bad, but it requires changes in DB. It will also enable you to create a successful payment with cancel reason etc. When you have a sing …
Vlasec's user avatar
  • 281
1 vote

Why were default and static methods added to interfaces in Java 8 when we already had abstra...

The two main purposes I see in default methods (some use cases serve both purposes): Syntax sugar. A utility class could serve that purpose, but instance methods are nicer. Extension of an existing …
Vlasec's user avatar
  • 281