mardi 7 novembre 2017

How to name methods that return random value?

I like to strictly follow code convention because it can help code readability. But I cannot find any rules about methods that return random value. For example I have a class like this:

class Foo {
    public static Foo getRandomFoo() { /*...*/ }
}

Sometimes I use next() following the name convention used in Random class. Which ones you choose in general, and why?




Aucun commentaire:

Enregistrer un commentaire