I'll only answer for Java:
I consider it good practice to use constants for readability of code as well as when a value is used at multiple places.
private static final int SECONDS_IN_DAY = 60 * 60 * 24 // sure, this will never change, but it will make the code where you use it a lot more readable
public static final String DEFAULT_USERNAME = "JohnDoe" // this can be used in several places
I consider it bad practice to go cargo-culting and replacing every literal by a constant
private static final int SMALLEST_POSSIBLE_INCREMENTOR = 1 // don't do this; please!
Also, use names for your constants that indicate what they do, not how they do it
private static final int SEVEN = 7 // oh please please don't do this
As for where to put them; I think constants belong in the class they belong to. For instance, if you have a datehelper class, that would be a good place
SECONDS_IN_DAY. If you have a User class, that's where to put the
Only put them in a global constants class if there's really no logical place to put them; which usually means your domain model is not the best it can be. Don't be too rough on yourself though.