Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

méthode retourne nom classe java

// retourne le nom de la classe, suivi du caractère @ et de son code en hexadecimal
<className>.toString();
// retourne seulement son nom
<className>.getClass().getName();
// Pour l'afficher à la console
System.out.print(<className>.toString());
System.out.print(<className>.getClass().getName());
// Pour l'insérer dans une variable
<varName> = <className>.toString();
<varName> = <className>.getClass().getName();
Comment

PREVIOUS NEXT
Code Example
Java :: marshalling in java 
Java :: java exception to string 
Java :: arraylist replace 
Java :: sort a list in java according to last name 
Java :: java list of lists 
Java :: update java windows 
Java :: bool in java 
Java :: get week number from localdate java 
Java :: arrays methods in java 
Java :: 2048 java code 
Java :: java get parent class 
Java :: selenium java control + enter 
Java :: spring boot example with swagger 
Java :: index 1 out of bound for length 1 java 
Java :: Salary example in method in java 
Java :: Java List Remove Elements using remove() method 
Java :: string to char array 
Java :: arrays vs collections 
Java :: get selected item spinner 
Java :: terminate function calling in java 
Java :: java return pair 
Java :: array of string java 
Java :: how to declare a interface in java 
Java :: No enclosing instance of type Foo is accessible. Must qualify the allocation with an enclosing instance of type Foo (e.g. x.new A() where x is an instance of Foo 
Java :: authentication in spring boot 
Java :: java check if array element is null 
Java :: labeled statement in java ex 
Java :: Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (execution: default-compile, phase: compile) 
Java :: add element to arraylist of arraylist java 
Java :: android adb is using too much cpu 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =