how many instances of c are there in:
q: error while saving a test class i have tried to insert session, speaker and session speaker object in test class and i am getting error as 

unexpected token static, unexpected token testmethod, variable
  does not exist: void errors.

below is my code :-
@istest
public class testrejectdoublebooking {
{
    //good scenario

    static testmethod void testsinglebooking() {
    datetime now = system.now();

    speaker__c speaker = new speaker__c(first_name__c=john, last_name__c=smith);
    insert speaker;

    session__c session = new session__c(name=human resources, session_date__c=now);
    insert session;

    session_speaker__c assignment =
        new session_speaker__c(session__c=session.id, speaker__c=speaker.id);
    test.starttest();
    database.saveresult result = database.insert(assignment, false);
    test.stoptest();

    system.assert(result.issuccess());
}

    static testmethod void testdoublebooking() {
    datetime now = system.now();

    speaker__c speaker = new speaker__c(first_name__c=john, last_name__c=smith);
    insert speaker;

    session__c session1 = new session__c(name=session 1, session_date__c=now);
    insert session1;
    session__c session2 = new session__c(name=session 2, session_date__c=now);
    insert session2;

    session_speaker__c assignment1 =
        new session_speaker__c(session__c=session1.id, speaker__c=speaker.id);
    insert assignment1;

    session_speaker__c assignment2 =
        new session_speaker__c(session__c=session2.id, speaker__c=speaker.id);
    test.starttest();
    database.saveresult result = database.insert(assignment2, false);
    test.stoptest();

    system.assert(!result.issuccess());
}

}
}


a: the problem is you are having an extra curly braces. it is just after the class declaration open curly braces and ends at just above class declaration closed curly braces. you have written like this:-
@istest
public class testrejectdoublebooking {
    {
        //good scenario
        static testmethod void testsinglebooking() {

        }
        static testmethod void testdoublebooking() {

        }
    }
}

where as ideally it should be:-
@istest
public class testrejectdoublebooking {
    //good scenario
    static testmethod void testsinglebooking() {        
    }

    static testmethod void testdoublebooking() {        
    }
}

always try to format the code which will help to identify these kind of issues.

user
I found seventy-two "c"s in the provided passage.
assistant