It is known that we cannot declare variable two times in java.Can anyone explain the output of following code? : The output of the prograam written is Null. 

class methodexample 
{ 

int number; 
String name; 

void data() 

{ 

int number=5; 

int name="Rahul";

 } 

void display() 

{ 

System.out.println("Number is" +number); 

System.out.println("Name is " +name); 

} 

public static void main(String args[]) 

{

 methodexample m=new methodexample(); 

m.data();

 m.display();

 }
 }
------------------------------------------------------------------------