Which of the following allows you to instantinate a LocationManager class?

Question:Which of the following allows you to instantinate a LocationManager class?

1.LocationManager lm = (LocationManager)Runtime.getSystemServiceInstance(Context.LOCATION_SERVICE);

2.LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);

3.LocationManager lm = new LocationManager(Context.LOCATION_SERVICE);

4.LocationManager lm = (LocationManager)SystemServiceFactory.createSystemService(Context.LOCATION_SERVICE);


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!