Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Classes or Interface  RSS feed

 
Nagarajan Krishnamurthy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i wanna move all my hard coding to a separate file.Which one is preferable clasess or Interface ?
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because this does not seem to be about the JavaRanch site, I'm moving it to JiG(b).
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the question, sorry...
 
Sam Francis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quote:

Because this does not seem to be about the JavaRanch site, I'm moving it to JiG(b).

I could not understand the sentences, could you pease clarify
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam, the original poster posted the question in the wrong forum, and the bartender moved it to JiG(b) = Java in General (beginner)...
 
Jaime M. Tovar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking about configuration code i would recomend a properties file, if you are talking about constants i will use an abstract class with static final for the values.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!