Car not wanting to start on 2001 Volvo S80

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
check engine light came on, code faulty 02 front sensor which was replaced,check engine light reappeared with same code. sometimes car does not want to start and light panel on dash will light up sometimes won't. could this be a starter or alternator problem? Replace new battery also.
(1) Answer
These are very complex systems. This really needs to go to a shop that has the equipment to read the diagnostic data in all the computers in the vehicle and update the software if necessary. If you continue to replace parts you will only create more issue, waste money and not fix the problem. This is a guarantee. Sorry to be so blunt, but I've worked on hundreds of Volvo's and this approach will not work. Please find a Volvo shop and have them look at this.
Best of luck to you.