Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

check java variable type using getSimpleName method

package javaapplication;

public class Employee {

    public static void main(String args[]) {

       
        Object[] mixedObjects = new Object[]{"Hello", true, 1, new StringBuilder("Hello there"), new Employee(), new String[10]};

        for (Object item : mixedObjects) {
            System.out.println(item.getClass().getSimpleName());
        }

    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java remove element from list 
Java :: node constructor 
Java :: cypher query having multiple values 
Java :: Array first Occurence 
Java :: You may test the newly compiled and packaged JAR in maven 
Java :: how do you rate yourself in java 
Java :: Repeat execution of function infini android studio 
Java :: how to find last digit in number by regex in java 
Java :: AndroidManifest.xml file describes the fundamental characteristics of the app and defines each of its components 
Java :: Uri/Beecrowd Problem no - 1185 Solution in Java 
Java :: Add items to ArrayList Using add() function 
Java :: HashMap to Pojo 
Java :: treeset order in java 
Java :: jsonpath xpath java 
Java :: menuitemcompat getactionview is deprecated in android 
Java :: how to open a folder in java swing project 
Java :: jav convert array as list to array 
Java :: confirmation dialog android 
Java :: logger output to console twice java 
Java :: is overriding only works with inherited methods? 
Java :: java optional input for funktions 
Java :: how to change text of textview in slide menu bar header android 
Java :: Append Line Separator In StringBuilder 
Java :: issue wsdl call java example 
Java :: java isalphanum 
Java :: how to insert a char at n position java 
Java :: clear array in java 
Java :: aaa testing java 
Java :: Rotate Vector by an angle 
Java :: import class java 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =