Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

please write java program of instanceOf keyword implementation

Answer Posted / dhanasekar

public class MainClass {
public static void main(String[] a) {

String s = null;
if (s instanceof java.lang.String) {
System.out.println("true");
} else {
System.out.println("false");
}
}

}

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are data types in programming?

949


What is void class in java?

922


How do you bind variables?

1032


What are predicates in java 8?

974


Is java hashset ordered?

1063


What is a singleton factory?

918


Can you use abstract and final both with a method?

1015


What is a ?

1160


Can we create a class inside a class in java?

1005


How to print an arraylist in java?

1008


Does set allows null in java?

911


What is static class

1058


What is a nested class?

1068


Who is the owner of java?

957


What is private public protected in java?

996