How to get record type id with recordtype name in apex String recordTypeId=Schema.SObjectType.Case.getRecordTypeInfosByName().get('Support').getRecordTypeId();
you cant have code outside your class , your class ends at line where it show error. if you remove that extra curly brace then error will go-away. Missing '<EOF>' at 'if' error in apex salesforce.