What’s wrong with this code?

public with sharing class CaseTriggerHandler {

public static boolean isBVal = false;
Private String parentRecordTypeId = [SELECT Id, Name FROM RecordType WHERE DeveloperName = ‘Parent’].Id;
Private String oRRecordTypeId = [SELECT Id, Name FROM RecordType WHERE DeveloperName = ‘OR’].Id;
Private String childRecordTypeId = [SELECT Id, Name FROM RecordType WHERE DeveloperName = ‘Child’].Id;

Most of the developers that I talked to having 4-5 certifications were not able to answer this simple question. I have an opportunity with a client.

So the question is: What’s wrong with this code? How would you solve it?