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

Is 0 true or false?

996


How do singleton patterns work?

961


List types of storage classes in java?

1134


What is bufferedwriter?

968


What are methods?

1017


What are format specifiers in java?

1050


What are the differences between c++ and java?

1123


How do you declare a string variable?

1012


What is difference between printf and scanf?

1133


Explain implementation and how is it different from conversion?

1074


What is object cloning in Java?

1099


What are the two types of streams offered by java 8?

922


Why singleton pattern is better than creating singleton class with static instance?

990


Is arraylist dynamic in java?

980


Explain the features of interfaces in java?

971