Terminology for path to class name in Java
Suppose I have a package org.test.selenium
and a class that is defined for it TestClass
. Then, what is the terminology for path org.test.selenium.TestClass
in Java?
Actually, I want to pass a variable that contains this method path, and hence I want to give the correct variable name.
source to share
It is commonly called the "Fully Qualified Class Name" (FQCN) and appears as such in various online dictionaries .
the Java specification mainly uses the terms "fully qualified name" or "canonical name" of a class, interface, type, etc.
source to share
This is called either fully qualified name
or canonical name
for a class (both are the same in this case, since it is a top-level class).
See Java Language Specification
If you want to pass exactly this name to a parameter String
, you must do it using
TestClass.class.getName()
source to share