Naming variables describing the same thing but of different type
问题 What is a commonly accepted approach in variable naming when dealing with variables that are of different type but describe the same thing? private String contentFolder = "/tmp/"; private File contentDirectory = new File(contentFolder); The above seems sloppy. But what is better? private String contentDirectoryStr = "/tmp/"; private File contentDirectory = new File(contentDirectoryStr); Looks just as bad. What is a common convention you follow to describe same things of different type?