[SOLVED] how to count how many times you used a method
Hello EveryOne :)
Is there a way that alows me to count the number of time that i used a method in a class??
exemple:
Code:
public class StudentRecord
{
public static void main(String Laythe[])
{
// Declare Instance Variables;
private String Name;
// Set up the name of every single student;
public void SetName(String Temp)
{
Name = Temp;
}
// Create Object instance of StudentRecod class;
StudentRecord LaytheRecord = new StudentRecord();
StudentRecord NarutoRecord = new StudentRecord();
StudentRecord DragonRecord = new StudentRecord();
// Set the names of the sutdents;
LaytheRecord.SetName("Laythe");
NarutoRecord.SetName("Naruto");
DragonRecord.SetName("Dragon");
// what can i do to count how many times i used the SetName() method?? ;
}
}