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

When should I use stringbuffer?

1054


Explain inner classes ?

1170


What is a stringbuffer?

1024


What is mysql driver class name?

1201


What are the types of casting?

1117


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

1543


What is ordered map in java?

1059


Can a list be null in java?

1100


Can you start a thread twice in Java?

1171


How to create packages in java?

991


Can we overload the constructors?

1037


What is the advantage of preparedstatement over statement?

1164


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

2215


Explain the reason behind ending a program with a system.exit(0)?

1128


What is an empty string in css?

1097