Assign return value of method to boolean a
Try this one:
while(a == true){
a=EndLoop(a);
System.out.print(".");
a= EndLoop(a);
}
a=true
will assign value of a to true even though you are returning false. Instead use a==true