Instance of an object Java : I have an object called Product and I want to check if a string is the name of an instance of Product class. So, I want to enter by keyboard a word and I want the program to tell me if the word is the instance of the object Product.

I tried the next code but it doesn't work. 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

     Product  laptop = new Product(1, "Laptop", "Type", 1350.25, "black");
     Product  mouse = new Product(2, "Mouse", "Type", 50.50, "black");

     String check = new String("laptop");

     if(check.equals(instanceof Product))  
    {
     System.out.println("Yes it is.");
    }
     else
    {
     System.out.println("No, it is not.");
    }

<!-- end snippet -->

.

  

