SetContentView em Java

In Android the visual design is stored in XML files and each Activity is
associated to a design.

In setContentView(R.layout.main):-
R means Resource
layout means design
main is the xml you have created under res->layout->main.xml

Whenever you want to change the current look of an Activity 
or when you move from one Activity to another, the new Activity must have 
a design to show. We call setContentView in onCreate with the desired design
as argument.
  
 *In short:- We can say it is a method to link our java file with xml file....
Open Octopus