Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting into Java: French Verb Conjugation Program
#16
Fiel Wrote:Also, it's bad karma to have "verbs" be a method. A method must be a Noun+Verb and variables must be nouns. A method named "verbs" is confusing.

Must not be "verb" or "Noun+verb".

These are "noun"-functions you can use on ArrayList, made by Sun(/Oracle):
size
hashCode
iterator
listIterator
subList

"Noun"-functions you can use on String:
hashCode
length
subSequence
substring

Not saying it's bad practise to use "verb", but you should rather have a short function-name that describes what it returns/does efficiently.

Fiel Wrote:Variables should be lowercaseUppercase
Methods should be UppercaseUppercase
Global constants should be UPPERCASE

That is highly dependent on the programming language you use. When you're using Java, this is wrong convention.

This is the standard Java-convention:

classes - TheClass
variables - theVariable
function - theFunction
static variables - THE_VARIABLE
static function - theFunction
final variable - THE_VARIABLE
Reply


Messages In This Thread
Getting into Java: French Verb Conjugation Program - by Nikkey - 2010-10-14, 07:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)