I need to read spaces (present before string and after String) given as input using Scanner Note : if there is no spaces given in input it should not add space in output
/@esprittn solution didn't work./
my solution:
while(scan.hasNext()){ name+=scan.nextLine(); }