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.

+3


source to share


3 answers


This is called the "fully qualified class name".

docs mentioned as



The fully qualified class name Rectangle

in the graphics package is graphics.Rectangle

, and the fully qualified class name Rectangle

in the package java.awt

is java.awt.Rectangle

.

+1


source


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.

+3


source


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()

      

+1


source







All Articles