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 is java and its types?

1094


What is the default value of byte datatype in java?

935


what is encapsulation in java? Explain

1113


What is the main functionality of the remote reference layer?

1999


What is synchronization and why is it important in java programming?

940


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

1149


Explain notifyall() method of object class ?

1090


What is role of void keyword in declaring functions?

1050


When is the finalize() called?

1176


What is a variable in java?

1132


Why do we use return statement?

1039


why Java does not support multiple inheritances?

1160


What are data types in programming?

991


Can we override static methods in java?

1070


How to convert string to byte array and vice versa?

1088